The upgrade to Ubuntu 12.04 delete MySQL and I need urgently to get it back. The problem is that I'm getting an error installing it, either with apt-get or aptitude:

Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've already tried different ways to install MySQL but without success, as reported in this thread at the Forum:


I believe I should file a bug, but following the instructions I thought better to ask here first.

Thank you for reading.


If you read the log carefully, you see that the problem is that there is a package called libmysqlclient-dev with the version 5.5.23-1~dotdeb.0 which provides the file /usr/lib/mysql/plugin/ha_example.so. So, it seems that you had mysql installed from http://www.dotdeb.org. Try removing those packages first. You can find out which packages are from there using the following:

aptitude search "?installed?origin(packages.dotdeb.org)"

Remove them and then also remove the corresponding entry in your /etc/apt/sources.list file. Run apt-get update and then re-try installing your MySQL server.

  • Where can I find the log you mentioned? Will try it as you say. Jun 11 '12 at 13:35
  • Ok, first of all thank you for replying to my question. Where's what I tried: $ sudo cat /etc/apt/sources.list | grep dotdeb.org # deb php53.dotdeb.org stable all # disabled on upgrade to precise # deb-src php53.dotdeb.org stable all # disabled on upgrade to precise $ sudo aptitude search "?installed?origin(dotdeb.org)" $ sudo aptitude search "?installed?origin(php53.dotdeb.org)" It seems that indeed I had PHP packages installed from dotdeb.org but running the search you suggested I'm not getting any results. In any case, why would PHP packages interfere with MySQL? Jun 11 '12 at 13:42
  • What does dpkg -S /usr/lib/mysql/plugin/ha_example.so tell you? Jun 11 '12 at 19:13
  • The log I was referring to was the command line log you posted on the Ubuntu forum. Jun 12 '12 at 6:28
  • Here it is: $ dpkg -S /usr/lib/mysql/plugin/ha_example.so libmysqlclient-dev: /usr/lib/mysql/plugin/ha_example.so If I understand it correctly you are saying this has to go. I believe I already tried that: ubuntuforums.org/showpost.php?p=12016658&postcount=6 Thank you for answering. Jun 12 '12 at 7:22

I finally managed to install mysql server following the tip by konrad, using sudo apt-get install -f.


Got caught with this one as well, with dependency failures when trying to run "apt-get -f install" but I found a different way out:

:~# aptitude install mysql-server
The following packages will be upgraded:
1 packages upgraded, 0 newly installed, 0 to remove and 323 not upgraded.
Need to get 0 B/11.5 kB of archives. After unpacking 1,024 B will be used.
The following packages have unmet dependencies:
 mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.34-0ubuntu0.12.04.1) but    5.5.37-0ubuntu0.12.10.1 is installed.
 The following actions will resolve these dependencies:

 Remove the following packages:
1)     mysql-server                
2)     mysql-server-5.5            

Accept this solution? [Y/n/q/?] Y
The following packages will be REMOVED:
  libdbd-mysql-perl{u} libdbi-perl{u} libmysqlclient18{u} 
  libnet-daemon-perl{u} libplrpc-perl{u} libterm-readkey-perl{u} 
  mysql-client-5.5{u} mysql-client-core-5.5{u} mysql-common{u} 
  mysql-server{a} mysql-server-5.5{a} 
0 packages upgraded, 0 newly installed, 11 to remove and 317 not upgraded.
Need to get 0 B of archives. After unpacking 76.9 MB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 215864 files and directories currently installed.)
Removing mysql-server ...
Removing mysql-server-5.5 ...
mysql stop/waiting
Removing mysql-client-5.5 ...
Removing libdbd-mysql-perl ...
Removing libdbi-perl ...
Removing libmysqlclient18:amd64 ...
Removing libplrpc-perl ...
Removing libnet-daemon-perl ...
Removing libterm-readkey-perl ...
Removing mysql-client-core-5.5 ...
Removing mysql-common ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Current status: 0 broken [-1], 317 updates [-7].
:~# apt-get install mysql-server

And, after that the install (e.g. would-be upgrade) went in cleanly.

Hope that helps others.


not sure that this will help but after upgrading to 12.04 and facing the same issues you guys did, I took a look at the error.log file and found this:

130508 12:09:04 [Note] Plugin 'FEDERATED' is disabled.
130508 12:09:04 InnoDB: The InnoDB memory heap is disabled
130508 12:09:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130508 12:09:04 InnoDB: Compressed tables use zlib
130508 12:09:04 InnoDB: Initializing buffer pool, size = 1.0G
130508 12:09:04 InnoDB: Completed initialization of buffer pool
130508 12:09:04 InnoDB: highest supported file format is Barracuda.
130508 12:09:04  InnoDB: Waiting for the background threads to start
130508 12:09:05 InnoDB: 5.5.31 started; log sequence number 569709903822
130508 12:09:05 [ERROR] /usr/sbin/mysqld: unknown variable 'log_bin_trust_routine_creators=1'
130508 12:09:05 [ERROR] Aborting

after commenting out 'log_bin_trust_routine_creators=1' it worked like a charm. apparently this is a deprecated option from mysql 5.1 and not recognized by 5.5

hope it helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.