Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

if I try to upgrade php on my vps with

apt-get install php5-cli

i get this error:

The following packages have unmet dependencies:
  php5-cli: Depends: libc6 (>= 2.11) but 2.6.1-1ubuntu10 is to be installed
            Depends: libdb4.8 but it is not installable
            Depends: libgssapi-krb5-2 (>= 1.6.dfsg.2) but it is not installable
            Depends: libk5crypto3 (>= 1.6.dfsg.2) but it is not installable
            Depends: libkrb5-3 (>= 1.6.dfsg.2) but it is not installable
            Depends: libncurses5 (>= 5.7+20100313) but 5.6+20070716-1ubuntu3 is to be installed
            Depends: libreadline6 (>= 6.0) but it is not installable
            Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8e-5ubuntu3.4 is to be installed
            Depends: libxml2 (>= 2.7.4) but 2.6.30.dfsg-2ubuntu1.4 is to be installed
E: Broken packages

how can i solve it?

edit with additional information: I added in my /etc/apt/sources.list :

deb stable all
deb stable/updates main contrib
deb stable all

and then run apt-get update

share|improve this question

migrated from Jul 24 '11 at 1:02

This question came from our site for professional and enthusiast programmers.

Do you have your package database updated? – Leandro F. Vaz Jul 24 '11 at 0:40
just added some additional information to the question, thanks – 1uc4 Jul 24 '11 at 0:46
why do you use debian stable packages when your tags say ubuntu ? – Rufinus Jul 24 '11 at 1:01
up vote 1 down vote accepted

You can solve it by using the correct package sources. You're obviously running Ubuntu (the versions of the packages you're running are a clear indication), but your sources.list is full of Debian stable packages. That isn't going to work -- while Ubuntu is derived from Debian, their packages do not intermingle freely.

Replace the sources entries you quoted above with ones appropriate to your distribution, and your upgrade will go a lot smoother.

share|improve this answer
Thanks a lot, I followed some wrong instructions in a blog article. I read that my vps runs a gutsy version of ubuntu. To update php have I to add gutsy only packages or i can add natty ones? – Luke Jul 24 '11 at 1:30
If you want to upgrade Ubuntu, you'll need to.. upgrade Ubuntu. Gutsy's hell-old, too; you've got quite a job ahead of you. – womble Jul 24 '11 at 2:09

You need to verify that you have the right distro. Run:

cat /etc/lsb-release

That will determine the release version you have. From there, when you pull the actual release name, follow the directions here:

share|improve this answer

Your Answer


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.