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

When i try ton install php5-mysql it gives this error

The following packages have unmet dependencies:
php5-mysql: Depends: php5-common (= 5.2.6.dfsg.1-3ubuntu4) but 5.2.6.dfsg.1-3ubuntu4.4 is to be installed
E: Broken packages

I tried installing php5-common but it says php5-common is new version

I think i have to install Code:


but i don't know what that is and how to upgrade it

share|improve this question
up vote 0 down vote accepted

try this - get rid of php and install it from scratch:

sudo bash
apt-get remove php5*
# now edit /etc/apt/sources.list and comment out any backports or non-canonical repositories you might have put there
apt-get clean
apt-get update
apt-get install php5-common php5-mysql libapache2-mod-php5
share|improve this answer

That is most likely an Ubuntu bug, which should be reported. As mysql is such a popular package, my guess would be that it will be solved any minute. Try updating your repository now and see if it works.

You should mention which version of Ubuntu you are running. That would help if we need to trace the bug.

share|improve this answer
i have ubuntu 9.04 , i have installed mysource matrix on that and it stops working if upgrade the whole OS , is there any other way to fix that , without upgrading the whole OS – John Mar 31 '10 at 6:27

Your Answer


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