Percona server 5.5/5.6 installation failed on Ubuntu 13.04/13.10(amd64)

While installing Percona Server 5.5/5.6 on Ubuntu 13.04/13.10, I got some weird errors, which I never faced before. Errors were something like,

dpkg: error processing /var/cache/apt/archives/libmysqlclient18_1%3a5.5.35-rel33.0-611.raring_amd64.deb (–unpack):
  libmysqlclient18:amd64 1:5.5.35-rel33.0-611.raring (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances

shell>  sudo apt-get install percona-server-server-5.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmysqlclient18 percona-server-client-5.5 percona-server-common-5.5
Suggested packages:
tinyca
The following NEW packages will be installed:
libdbd-mysql-perl libmysqlclient18 percona-server-client-5.5 percona-server-common-5.5 percona-server-server-5.5
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.0 MB/31.9 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://repo.percona.com/apt/ raring/main percona-server-common-5.5 amd64 1:5.5.35-rel33.0-611.raring [3,144 B]
Get:2 http://repo.percona.com/apt/ raring/main percona-server-client-5.5 amd64 1:5.5.35-rel33.0-611.raring [8,593 kB]
Get:3 http://repo.percona.com/apt/ raring/main percona-server-server-5.5 amd64 1:5.5.35-rel33.0-611.raring [22.4 MB]
Fetched 31.0 MB in 60s (508 kB/s)
Preconfiguring packages ...
dpkg: error processing /var/cache/apt/archives/libmysqlclient18_1%3a5.5.35-rel33.0-611.raring_amd64.deb (--unpack):
 libmysqlclient18:amd64 1:5.5.35-rel33.0-611.raring (Multi-Arch: no) is not co-installable with libmysqlclient18 which has multiple installed instances
 Selecting previously unselected package libdbd-mysql-perl.
(Reading database ... 195063 files and directories currently installed.)
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.021-1_amd64.deb) ...
Selecting previously unselected package percona-server-common-5.5.
Unpacking percona-server-common-5.5 (from .../percona-server-common-5.5_1%3a5.5.35-rel33.0-611.raring_amd64.deb) ...
Selecting previously unselected package percona-server-client-5.5.
Unpacking percona-server-client-5.5 (from .../percona-server-client-5.5_1%3a5.5.35-rel33.0-611.raring_amd64.deb) ...
Selecting previously unselected package percona-server-server-5.5.
Unpacking percona-server-server-5.5 (from .../percona-server-server-5.5_1%3a5.5.35-rel33.0-611.raring_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
 Errors were encountered while processing:
 /var/cache/apt/archives/libmysqlclient18_1%3a5.5.35-rel33.0-611.raring_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
 shell>

After so much research I found that, errors were occurred due to some old entries in package list which actually uninstalled from Ubuntu but not removed from the list like

shell>  dpkg --get-selections | grep -i libmysqlclient18
libmysqlclient18:amd64                deinstall
libmysqlclient18:i386                deinstall
libmysqlclient18.1                deinstall
shell> dpkg --get-selections | grep -i percona
percona-server-client-5.5            install
percona-server-client-5.6            deinstall -- this one
percona-server-common-5.5            install
percona-server-server-5.5            install
percona-server-server-5.6            deinstall -- this one

Solution:

purge all old entries (deinstall) from the dpkg list and then try with “sudo apt-get -f install”

shell>  sudo dpkg --purge libmysqlclient18:i386
(Reading database ... 195352 files and directories currently installed.)
Removing libmysqlclient18:i386 ...
Purging configuration files for libmysqlclient18:i386 ...
shell>
shell>  dpkg --purge libmysqlclient18:amd64
dpkg: error: requested operation requires superuser privilege
shell>  sudo dpkg --purge libmysqlclient18:amd64
(Reading database ... 195352 files and directories currently installed.)
Removing libmysqlclient18:amd64 ...
Purging configuration files for libmysqlclient18:amd64 ...
shell>
shell>  sudo dpkg --purge libmysqlclient18.1
(Reading database ... 195352 files and directories currently installed.)
Removing libmysqlclient18.1 ...
Purging configuration files for libmysqlclient18.1 ...
shell>
shell>  dpkg --get-selections | grep -i libmysql
shell>
shell>  sudo dpkg --purge percona-server-client-5.6
(Reading database ... 195352 files and directories currently installed.)
Removing percona-server-client-5.6 ...
Purging configuration files for percona-server-client-5.6 ...
shell>
shell>  sudo dpkg --purge percona-server-server-5.6
(Reading database ... 195352 files and directories currently installed.)
Removing percona-server-server-5.6 ...
Purging configuration files for percona-server-server-5.6 ...
Processing triggers for ureadahead ...
shell>
shell>  sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libmysqlclient18
The following NEW packages will be installed:
libmysqlclient18
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 0 B/848 kB of archives.
After this operation, 3,197 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Selecting previously unselected package libmysqlclient18.
(Reading database ... 195349 files and directories currently installed.)
Unpacking libmysqlclient18 (from .../libmysqlclient18_1%3a5.5.35-rel33.0-611.raring_amd64.deb) ...
Setting up libmysqlclient18 (1:5.5.35-rel33.0-611.raring) ...
Setting up libdbd-mysql-perl (4.021-1) ...
Setting up percona-server-client-5.5 (1:5.5.35-rel33.0-611.raring) ...
Setting up percona-server-server-5.5 (1:5.5.35-rel33.0-611.raring) ...
* Stopping MySQL (Percona Server) mysqld                                                                                               [ OK ]
140131  9:59:10 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
* Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
* Run the following commands to create these functions:
mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"
* See http://www.percona.com/doc/percona-server/5.5/management/udf_percona_toolkit.html for more details
* Starting MySQL (Percona Server) database server mysqld                                                                               [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for ureadahead ...
shell>

4 thoughts on “Percona server 5.5/5.6 installation failed on Ubuntu 13.04/13.10(amd64)”

Leave a Reply

Your email address will not be published. Required fields are marked *