Bug #73522 Installation of libmysqlclient-dev fails if libmysqlclient18 is from percona
Submitted: 10 Aug 2014 10:56 Modified: 12 Sep 2014 3:39
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.6 OS:Linux (Ubuntu 14.04.1 (trusty))
Assigned to: Akhil Mohan CPU Architecture:Any

[10 Aug 2014 10:56] Daniël van Eeden
Description:
$ sudo apt-get install libmysqlclient-dev 
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:
 libmysqlclient-dev : Depends: libmysqlclient18 (= 5.6.20-1ubuntu14.04)
E: Unable to correct problems, you have held broken packages.

$ apt-cache policy libmysqlclient18
libmysqlclient18:
  Installed: 1:5.5.35-rel33.0-611.raring
  Candidate: 1:5.5.35-rel33.0-611.raring
  Version table:
 *** 1:5.5.35-rel33.0-611.raring 0
        100 /var/lib/dpkg/status
     5.6.20-1ubuntu14.04 0
        500 http://repo.mysql.com/apt/ubuntu/ trusty/mysql-5.6 amd64 Packages
     5.5.38-0ubuntu0.14.04.1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     5.5.35+dfsg-1ubuntu1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

How to repeat:
Install libmysqlclient18 version 1:5.5.35-rel33.0-611.raring from percona
Then try to install libmysqlclient-dev from the Oracle MySQL repo.
[10 Aug 2014 10:59] Daniël van Eeden
My solution:

$ sudo dpkg --remove --force-depends libmysqlclient18
dpkg: libmysqlclient18: dependency problems, but removing anyway as you requested:
 mysql-workbench-community depends on libmysqlclient18 (>= 5.5.13-1).
 mydumper depends on libmysqlclient18 (>= 5.5.13-1).
 r-cran-rmysql depends on libmysqlclient18 (>= 5.5.13-1).
 libdbd-mysql-perl depends on libmysqlclient18 (>= 5.5.13-1); however:
  Package libmysqlclient18 is to be removed.
 libqt4-sql-mysql:amd64 depends on libmysqlclient18 (>= 5.5.24+dfsg-1).
 python-mysqldb depends on libmysqlclient18 (>= 5.5.13-1).

(Reading database ... 461217 files and directories currently installed.)
Removing libmysqlclient18 (1:5.5.35-rel33.0-611.raring) ...
Processing triggers for libc-bin (2.19-0ubuntu6.1) ...

$ sudo apt-get install libmysqlclient18
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libmysqlclient18
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 676 kB of archives.
After this operation, 3,839 kB of additional disk space will be used.
Get:1 http://repo.mysql.com/apt/ubuntu/ trusty/mysql-5.6 libmysqlclient18 amd64 5.6.20-1ubuntu14.04 [676 kB]
Fetched 676 kB in 0s (2,520 kB/s)    
Selecting previously unselected package libmysqlclient18:amd64.
(Reading database ... 461214 files and directories currently installed.)
Preparing to unpack .../libmysqlclient18_5.6.20-1ubuntu14.04_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.6.20-1ubuntu14.04) ...
Setting up libmysqlclient18:amd64 (5.6.20-1ubuntu14.04) ...
Processing triggers for libc-bin (2.19-0ubuntu6.1) ...

$ sudo apt-get install libmysqlclient-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libmysqlclient-dev
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,058 kB of archives.
After this operation, 9,638 kB of additional disk space will be used.
Get:1 http://repo.mysql.com/apt/ubuntu/ trusty/mysql-5.6 libmysqlclient-dev amd64 5.6.20-1ubuntu14.04 [1,058 kB]
Fetched 1,058 kB in 0s (1,652 kB/s)          
Selecting previously unselected package libmysqlclient-dev.
(Reading database ... 461221 files and directories currently installed.)
Preparing to unpack .../libmysqlclient-dev_5.6.20-1ubuntu14.04_amd64.deb ...
Unpacking libmysqlclient-dev (5.6.20-1ubuntu14.04) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libmysqlclient-dev (5.6.20-1ubuntu14.04) ...
[11 Aug 2014 8:19] Akhil Mohan
Hi Daniël,

Thanks for sharing this detailed information on your attempt to upgrade from a percona installation. Currently, this upgrade scenario is not supported.

In case you wish to install the MySQL development headers then it would need the client library package with same version from our Repo.

As we do not support upgrading from other vendor packages, so we do not remove them on request to install our packages as it may cause trouble with all products on the system that are currently using that client library package.

Ideally, we expect users to completely remove all the packages received from another vendor and then install the packages from MySQL APT Repo. I do understand your discomfort but for now the only option is to do a manual upgrade.

Regards,
Akhil
[11 Aug 2014 10:29] Daniël van Eeden
What happened here is this:
The installed version is
1:5.5.35-rel33.0-611.raring

The available versions are:
5.6.20-1ubuntu14.04
5.5.38-0ubuntu0.14.04.1
5.5.35+dfsg-1ubuntu1

There is no epoch in the available version numbers, so epoch = 0.
So with epoch the versions are:
0:5.6.20-1ubuntu14.04
0:5.5.38-0ubuntu0.14.04.1
0:5.5.35+dfsg-1ubuntu1

Information about epoch can be found in deb-version(5)
http://manpages.ubuntu.com/manpages/trusty/man5/deb-version.5.html

I think the Percona version is at fault as it prohibits the installation of newer non-percona software.

Maybe this can be added to the documentation as a known-issue?
[11 Aug 2014 11:34] Akhil Mohan
Hi Daniël,

It may not be due to percona. Our packages need to advice dpkg that we can replace the functionality provide by existing percona package so it is okay to remove and replace the existing files with new ones from MySQL packages.

As I said before it won't be possible until we start supporting the feature officially and then add the percona packages to replacement list.

We have mentioned in APT Repo Docs that user cannot upgrade from packages provided by other vendors.

I believe this has to remain manual for now. I will try to discuss with Docs team we can better reflect this limitation for ease of users.

Regards,
Akhil