I had a messy mysql installation on my Debian server. I got rid of everything using the dpkg --force all --purge packet on any mysql packet I could find (mysql-common, mysql-server, mysql-client, phpmyadmin, etc..)

Now I though it would be easy to do a fresh reinstall, however I get stuck with the following error message:

sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mysql-server : Depends: mysql-server-5.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What bothers me is I don't seem to have held packages, dpkg --get-selections | grep hold doesn't return anything.

I also tried with aptitude:

sudo aptitude install mysql-server
The following NEW packages will be installed:
  libaio1{a} libdbd-mysql-perl{ab} libdbi-perl{ab} libmysqlclient18{a} mysql-client-5.6{a} mysql-client-core-5.6{a} mysql-common{a} mysql-common-5.6{a} mysql-server 
  mysql-server-5.6{a} mysql-server-core-5.6{a} 
0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 40,6 MB/47,5 MB of archives. After unpacking 155 MB will be used.
The following packages have unmet dependencies:
 libdbd-mysql-perl : Depends: perlapi-5.14.2 which is a virtual package.
 libdbi-perl : Depends: perlapi-5.14.2 which is a virtual package.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libdbd-mysql-perl [Not Installed]                  
2)     libdbi-perl [Not Installed]                        
3)     mysql-client-5.6 [Not Installed]                   
4)     mysql-server [Not Installed]                       
5)     mysql-server-5.6 [Not Installed]  

However as you can see that doesn't install anything..

I am stuck now and can't find how to get a working MySQL server.. Any help greatly appreciated.

1 Answer 1


First run:

aptitude -f install

Then create mysql.list file :

 nano /etc/apt/sources.list.d/mysql.list

add the following lines:

deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6
deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6

Update and install mysql 5.6:

apt-get update
apt-get install mysql-server-5.6

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .