Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to run

sudo apt-get install php5

And getting this error

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php5 : Depends: libapache2-mod-php5 (>= 5.4.17-1~dotdeb.1) but it is not going to be installed or
             libapache2-mod-php5filter (>= 5.4.17-1~dotdeb.1) but it is not going to be installed or
             php5-cgi (>= 5.4.17-1~dotdeb.1) but it is not going to be installed or
             php5-fpm (>= 5.4.17-1~dotdeb.1) but it is not going to be installed
    Depends: php5-common (>= 5.4.17-1~dotdeb.1) but it is not going to be installed
E: Broken packages

Any idea how to make this work?

share|improve this question
    
Which Ubuntu version? You have not pasted the full apt-get output; there might be interesting parts left out. Have you tried just running sudo apt-get update and then retrying the installation? It might just be a transitional problem that will go away in a couple of hours. –  Daniel Andersson Jul 24 '13 at 18:46

2 Answers 2

up vote 1 down vote accepted

Your output seems to indicate you use additional repositories. So one alternative would be to restrict yourself to the official repositories, so as to avoid conflict. Or it could be your alternative repository is set to a different version of Ubuntu (or even Debian), case in which you would want to edit your /etc/apt/sources.list to fix it (or use your favourite GUI to that effect.

share|improve this answer

Try running:

sudo apt-get update

If you don't get any errors then try the install again, if that doesn't fix it try installing the dependencies manually.

sudo apt-get install php5-common
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.