How to fix mysql-server depends on mysql-server-5.5; however: Package mysql-server 5.5 is not configured yet.

Recently while attempting to setup a new GitLab server on Ubuntu 14.04 using my iGitLab installer script, I ran into an issue when the script attempted to install MySQL (mysql-server) through APT.  The specific error was  dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.5; however: Package mysql-server-5.5 is not configured yet.

I tried removing MySQL and reinstalling, even attempted to configure through mysql-server-5.5, none of which worked, but luckily I did find a way to easily fix this …

When attempting to install MySQL through apt-get you are essentially installing from the Ubuntu/Debian package repository, and more than likely the error you’re getting is because you’re using an old image/iso of Ubuntu/Debian that is no longer compatible with the packages you are trying to install.

In my specific instance I created a new VPS from an Ubuntu 14.04 image, but it seems the latest package available from the Ubuntu Repository is not compatible with that version…but don’t worry, it’s very easy to fix.

Clean and remove MySQL and old/cached packages

First what you need to do is remove what has already been installed:

This will clean the repository cache, and remove anything that was installed and starts with mysql.

Upgrade to latest distribution version

Next you will need to upgrade the existing distribution to the latest version which is what the packages are tested against.  Running this command will not upgrade to a new major version (like 14.04 to 14.10), but it will upgrade to the latest minor version (in my case it was 14.04 to 14.04.2).  To upgrade to the latest major version (with Ubuntu) you would need to use do-release-upgrade.

To give you a better understanding of what dist-upgrade  does, here’s the description from the apt man page:

Install MySQL

Now that you have upgraded to the latest release of your current major distribution version you can go ahead and reinstall MySQL and everything should work correctly:

Profit!

apt-get error examples:

 

Myles

Orlando, FL

Did this post help you?

Give back and rate it for me!

Related Posts

  • Mind Fields

    Thanks. Worked like a charm.