5

When I start the Ubuntu software centre, it says I cannot do anything until the package catalog is repaired. However, repairing fails.

I ran sudo apt-get -f install and found the problem to be:

mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.24-0ubuntu0.12.04.1); however:
  Version of mysql-server-core-5.5 on system is 5.5.28-0ubuntu0.12.04.2.

So, the question is, how do I install that version and resolve the dependency problem?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Tama
  • 59
  • 1
  • 1
  • 2
  • Did you install anything from source? – harisibrahimkv Nov 17 '12 at 11:05
  • What is the output of apt-cache policy mysql-server-5.5 mysql-server-core-5.5 and cat /etc/apt/sources.list{,.d/*.list} – Braiam Mar 11 '14 at 23:08
  • I had this problem, but really what was needed was a "purge" (from this thread: http://askubuntu.com/questions/292865/upgrade-mysql-server-issue) – sceo Jul 07 '13 at 19:16

3 Answers3

3

Since I didn't actually need MySQL server anymore I solved this by uninstalling programs with unresolved dependencies one by one.

First I had a similar error:

mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.29-0ubuntu0.12.04.1)
  but 5.5.29-0ubuntu0.12.04.2 is to be installed

I uninstalled mysql-server-core-5.5 using dpkg:

$ sudo dpkg --remove mysql-server-core-5.5

The another error arised:

mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.29-0ubuntu0.12.04.2)
  but it is not going to be installed

Uninstall mysql-server-5.5 this time:

$ sudo dpkg --remove mysql-server-5.5

One step higher in the hierarchy:

mysql-server : Depends: mysql-server-5.5 but it is not going to be installed

Uninstall mysql-server:

sudo dpkg --remove mysql-server

Seems to work now.

Iulius Curt
  • 173
  • 1
  • 1
  • 7
2

First make sure your package sources are correct. Then run a

sudo apt-get update
sudo apt-get -f install

just to make sure. If that still doesn't work then continue on.

Remove the offending package

sudo dpkg --remove 5.5.28-0ubuntu0.12.04.2

folowed by

sudo apt-get -f install

This should remove MySQL completely (including the meta packages you stated).

You can then re-install with:

sudo apt-get install mysql-server-5.5

coteyr
  • 18,288
1

I had the same problem with mysql-server-core-5.5 version 5.5.29-0ubuntu0.12.04.1

mysql-server-5.5 depende de mysql-server-core-5.5 (= 5.5.24-0ubuntu0.12.04.1); sin embargo: La versión de `mysql-server-core-5.5' en el sistema es 5.5.29-0ubuntu0.12.04.1

I solved it with this commands:

  1. Backup de database(s)
  2. Check all version avaible of mysql-server for you linux distribution. sudo apt-cache madison mysql-server-5.5.
  3. Remove the packages of mysql-server. sudo apt-get remove mysql-server-5.5 mysql-server-core-5.5.
  4. Install a old version (see the second point for select one). And run the command: sudo apt-get install mysql-server-5.5=5.5.22-0ubuntu1 mysql-server-core-5.5=5.5.22-0ubuntu1