Skip to content

Instantly share code, notes, and snippets.

@Geoffrey-T
Last active December 28, 2015 05:19
Show Gist options
  • Save Geoffrey-T/7449202 to your computer and use it in GitHub Desktop.
Save Geoffrey-T/7449202 to your computer and use it in GitHub Desktop.
Mariadb dependencies problem after linux (ubuntu 12.04) update

#MariaDB

The error:

In french:

Les paquets suivants contiennent des dépendances non satisfaites :

 mariadb-server-5.5 : Dépend: mariadb-client-5.5 (>= 5.5.30-mariadb1~quantal) mais ne sera pas installé

                      Dépend: mariadb-server-core-5.5 (>= 5.5.30-mariadb1~quantal) mais ne sera pas installé

In english:

The following packages have unmet dependencies:

  mariadb-server : Depends: mariadb-server-5.5 (>= 5.5.30-mariadb1~quanta) but it is not going to be installed

                   Dépends: mariadb-server-core-5.5 (>= 5.5.30-mariadb1~quantal) but it is not going to be installed

 E: Unable to correct problems, you have held broken packages.

How to fix it?

Create file:

sudo touch /etc/apt/preferencies.d/mariadb

Edit:

sudo vim /etc/apt/preferencies.d/mariadb

Add this lines :

Package: *
Pin: origin ftp.igh.cnrs.fr #change this domain with your mariadb repository domain (which is use with apt)
Pin-Priority: 1000

Remove all mariadb packages & mysql

sudo apt-get purge mysql* mariadb*

Install Mariadb

sudo apt-get install mariadb-server

Doesn't forget to re-install pdo driver :

sudo apt-get install php5-mysql

Enjoy !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment