[MDEV-2574] LP:730557 - apt-get install mariadb-server-5.2 fails on Debian squeeze Created: 2011-03-07  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kristian Nielsen Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug730557.xml     File LPexportBug730557_dpkg.status.tgz    

 Description   

Two users reported this problem.

We do not see it in our automatic install/upgrade test, so it may be specific to a particular set of installed packages, or maybe the VMs in the Buildbot need to be upgraded to latest version of squeeze to see it.

I will try to reproduce manually.

The problem is not that package mariadb-common is missing (it is provided by the mysql-common package), but that apt-get does not automatically select the right dependency resolution. Another user reported that a workaround was to use aptitude to install, deny the first solution it proposes, and accept the second solution:

    $ sudo aptitude install mariadb-server-5.2 mysql-common
    ...
    The following actions will resolve these dependencies:
  Keep the following packages at their current version:
    1) libmariadbclient16 [Not Installed]
    2) mariadb-client-5.2 [Not Installed]
    3) mariadb-client-core-5.2 [Not Installed]
    4) mariadb-server-5.2 [Not Installed]
    5) mariadb-server-core-5.2 [Not Installed]
    Accept this solution? [Y/n/q/?] n

    The following actions will resolve these dependencies:
  Install the following packages:
    1) libmysqlclient16 [5.2.5-mariadb99~squeeze (<NULL>)]

  Upgrade the following packages:
    2) mysql-common [5.1.49-3 (now, stable) -> 5.2.5-mariadb99~squeeze (<NULL>)]

    Accept this solution? [Y/n/q/?] y

Here is a description of the problem from Oliver Schneider:

I have tried to install MariaDB (tried both 5.1 and
5.2) on a Debian 6.0 system, following closely the steps described here:

  http://kb.askmonty.org/v/installing-mariadb-deb-files

However, for both cases apt will complain about a missing package
mariadb-common and indeed there is no such package in either one of the
package repositories.

Any ideas as to what I'm doing wrong? There is a package called
mysql-common_5.1.55-mariadb98~squeeze_all.deb for 5.1 and
mysql-common_5.2.5-mariadb99~squeeze_all.deb for 5.2 in the
repositories, but apparently the other .deb references a mariadb-common ...

Thanks in advance,

// Oliver

PS: Exact messages:

----------------------------
$ apt-get install mariadb-server-5.2
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:
 mariadb-server-5.2 : Depends: mariadb-client-5.2 (>=
5.2.5-mariadb99~squeeze) but it is not going to be installed
                      Depends: libmariadbclient16 (>= 5.1.21-1) but it
is not going to be installed
                      Depends: mariadb-server-core-5.2 (>=
5.2.5-mariadb99~squeeze) but it is not going to be installed
                      PreDepends: mariadb-common
E: Broken packages

----------------------------
$ apt-get install mariadb-server-5.1
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:
 mariadb-server-5.1 : Depends: mariadb-client-5.1 (>=
5.1.55-mariadb98~squeeze) but it is not going to be installed
                      Depends: libmariadbclient16 (>= 5.1.21-1) but it
is not going to be installed
                      Depends: mariadb-server-core-5.1 (>=
5.1.55-mariadb98~squeeze) but it is not going to be installed
                      PreDepends: mariadb-common
E: Broken packages



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-03-07 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
Folks, here are the two files with the package status before installation of mariadb (dpkg.status.1) and after successful installation (dpkg.status.0).

Note that the state prior to successful installation only references mysql in suggestions to installed packages.

The only thing that is special about the system in question is that it was upgraded from Lenny to Squeeze. Otherwise it's pretty much vanilla.

I'm trying to reproduce it in a VM. If I manage to gather more info I'll post it here.

Comment by Rasmus Johansson (Inactive) [ 2011-03-07 ]

Folks, here are the two files with the package status before installation of mariadb (dpkg.status.1) and after successful installation (dpkg.status.0).

Note that the state prior to successful installation only references mysql in suggestions to installed packages.

The only thing that is special about the system in question is that it was upgraded from Lenny to Squeeze. Otherwise it's pretty much vanilla.

I'm trying to reproduce it in a VM. If I manage to gather more info I'll post it here.
dpkg.status.tgz
LPexportBug730557_dpkg.status.tgz

Comment by Rasmus Johansson (Inactive) [ 2011-03-07 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
If I remember correctly, I installed some build tools also, in order to get mariadb to build from source (which would have been the last resort). Anyway, that's why there are a few more differences than just related packages ...

Comment by Rasmus Johansson (Inactive) [ 2011-03-07 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
If it helps, here is the history of command I used (comments spliced in before:

sudo nano /etc/apt/sources.list

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1BB943DB

  1. ... this is the first failed attempt

sudo apt-get install mariadb-server

  1. so I thought I should try to install the mysql-common package,
  1. which was the MySQL one

sudo apt-get install mysql-common

  1. ... failed again

sudo apt-get install mariadb-server-5.2

  1. so I removed it again

sudo apt-get --purge remove mysql-common

  1. checking settings ...

sudo nano /etc/apt/sources.list.d/mariadb.list

  1. looking up cache output as per Kristian's request (in IRC)

sudo apt-get update && sudo apt-cache show mysql-common

  1. attempting again, but fails:

sudo apt-get install mariadb-server-5.2

  1. attempting again, but fails:

sudo apt-get install mariadb-server-5.2 mariadb-client-5.2 libmariadbclient16

  1. attempting again, but fails:

sudo apt-get install mariadb-server-5.2 mariadb-client-5.2 libmariadbclient16 mysql-common

  1. attempting again, but fails:

sudo aptitude install mariadb-server-5.2 mysql-common

  1. trying again, this time rejecting first conflict resolution, taking second one ...

sudo aptitude install mariadb-server-5.2 mysql-common

Comment by Rasmus Johansson (Inactive) [ 2011-03-07 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
Just tried with my Debian 6 test setup (not upgraded from Debian 5, but fresh install) and that worked without a hitch. No conflicts were reported and installation worked smoothly.

So my guess would be that it has to do with the upgrade ... will try to reproduce it with an upgrade now.

Comment by Kristian Nielsen [ 2011-03-08 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
Thanks Oliver for your efforts so far. It is a really strange problem, at least to my eyes.

I think the core of the problem might be this, from a paste of one of your failures:

libmariadbclient16:
Depends: libmysqlclient16 (= 5.2.5-mariadb99~squeeze) but 5.1.49-3 is to be installed.

For some reason, apt-get wants to install the MySQL version of libmysqlclient16 (5.1.49-3). This will not work, but I have no idea why apt-get would choose the lower version 5.1.49-3 over the higher version 5.2.5-mariadb99~squeeze. I read `man 5 deb-version`, and I read it as the mariadb version being bigger and so should be prefered.

Also your attempts to install the mysql-common package explicitly should likewise have pulled in the MariaDB version, as that version is again higher than the mysql one.

Your paste of the aptitude install command shows that in fact the old version of mysql-common was installed:

Upgrade the following packages:
2) mysql-common [5.1.49-3 (now, stable) -> 5.2.5-mariadb99~squeeze (<NULL>)]

I can only speculate that apt/aptitude somehow ended up thinking the old version of mysql-common was pinned/prefered by the user. But I have no idea why that would have happened

Comment by Rasmus Johansson (Inactive) [ 2011-03-09 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
I haven't been able to reproduce this on another machine so far. But I'm not using any pinning or so in my APT configuration, so the choice of picking the older package by apt-get is plain bizarre.

I'll give it another try tonight.

Comment by Kristian Nielsen [ 2011-04-04 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
I think we'll have to close this bug report, as we are unable to reproduce. Though it would have been nice to understand what the issue is, as there was obviously some kind of problem there.

Comment by Timour Katchaounov (Inactive) [ 2011-07-24 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
Kristian,

Today I tried to install MariaDB 5.3 on my Ubunty 11.04 64-bit.
It seems I got the same problem:

First I added the 5.3 repo, and just tried to install mariadb-server.
This is the output on the console:

$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmariadbclient16 libmysqlclient16 libnet-daemon-perl libplrpc-perl
mariadb-client-5.3 mariadb-client-core-5.3 mariadb-server-5.3 mariadb-server-core-5.3 mysql-common
Suggested packages:
libipc-sharedcache-perl tinyca mariadb-test
The following packages will be REMOVED:
mysql-client-core-5.1 mysql-server-core-5.1
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libmariadbclient16 libnet-daemon-perl libplrpc-perl mariadb-client-5.3
mariadb-client-core-5.3 mariadb-server mariadb-server-5.3 mariadb-server-core-5.3
The following packages will be upgraded:
libmysqlclient16 mysql-common
2 upgraded, 11 newly installed, 2 to remove and 0 not upgraded.
Need to get 23,8 MB of archives.
After this operation, 40,9 MB of additional disk space will be used.
Do you want to continue [Y/n]?

... Getting packages ...

Fetched 23,8 MB in 17s (1367 kB/s)
Preconfiguring packages ...
dpkg: mysql-server-core-5.1: dependency problems, but removing anyway as you requested:
akonadi-server depends on mysql-server-core-5.1.
(Reading database ... 244813 files and directories currently installed.)
Removing mysql-server-core-5.1 ...
dpkg: mysql-client-core-5.1: dependency problems, but removing anyway as you requested:
akonadi-server depends on mysql-client-core-5.1; however:
Package mysql-client-core-5.1 is to be removed.
Removing mysql-client-core-5.1 ...
Processing triggers for man-db ...
(Reading database ... 244720 files and directories currently installed.)
Preparing to replace mysql-common 5.1.54-1ubuntu4 (using .../mysql-common_5.3.0-mariadb101~natty_all.deb) ...
Unpacking replacement mysql-common ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.43-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.612-1_amd64.deb) ...
Selecting previously deselected package libmariadbclient16.
Unpacking libmariadbclient16 (from .../libmariadbclient16_5.3.0-mariadb101~natty_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libmariadbclient16_5.3.0-mariadb101~natty_amd64.deb (--unpack):
trying to overwrite '/usr/lib/libmysqlclient_r.so.16.0.0', which is also in package libmysqlclient16 5.1.54-1ubuntu4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace libmysqlclient16 5.1.54-1ubuntu4 (using .../libmysqlclient16_5.3.0-mariadb101~natty_amd64.deb) ...
Unpacking replacement libmysqlclient16 ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.016-1_amd64.deb) ...
Selecting previously deselected package mariadb-client-core-5.3.
Unpacking mariadb-client-core-5.3 (from .../mariadb-client-core-5.3_5.3.0-mariadb101~natty_amd64.deb) ...
Selecting previously deselected package mariadb-client-5.3.
Unpacking mariadb-client-5.3 (from .../mariadb-client-5.3_5.3.0-mariadb101~natty_amd64.deb) ...
Selecting previously deselected package mariadb-server-core-5.3.
Unpacking mariadb-server-core-5.3 (from .../mariadb-server-core-5.3_5.3.0-mariadb101~natty_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Errors were encountered while processing:
/var/cache/apt/archives/libmariadbclient16_5.3.0-mariadb101~natty_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I tried a second time to see a more concise error message:

$ sudo apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmysqlclient16 : Depends: libmariadbclient16 (= 5.3.0-mariadb101~natty) but it is not going to be installed
mariadb-client-5.3 : Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not going to be installed
mariadb-client-core-5.3 : Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not going to be installed
mariadb-server : Depends: mariadb-server-5.3 but it is not going to be installed
mariadb-server-core-5.3 : Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

It seems there is some dependency between akonadi-server and MySQL.

Now I am stuck. I have a standard Ubuntu install, where I added the mysql-5.1 packages
that are needed for the build environment (and that we recommend on our Wiki).

Comment by Timour Katchaounov (Inactive) [ 2011-07-24 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
After these attempts, the ubuntu update manager suggested to
install "MariaDB database client library", when I tried, I got a
system error message "The package system is broken", with
the following details:

The following packages have unmet dependencies:

libmysqlclient16: Depends: libmariadbclient16 (= 5.3.0-mariadb101~natty) but it is not installed
mariadb-client-5.3: Depends: mariadb-common but it is a virtual package
Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not installed
Depends: mariadb-client-core-5.3 (>= 5.3.0-mariadb101~natty) but 5.3.0-mariadb101~natty is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.3.4.dfsg-3ubuntu3 is installed
mariadb-client-core-5.3: Depends: mariadb-common but it is a virtual package
Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not installed
Depends: libncurses5 (>= 5.5-5~) but 5.7+20101128-1 is installed
Depends: libreadline6 (>= 6.0) but 6.2-0ubuntu1 is installed
Depends: zlib1g (>= 1:1.1.4) but 1:1.2.3.4.dfsg-3ubuntu3 is installed
mariadb-server-core-5.3: Depends: libwrap0 (>= 7.6-4~) but 7.6.q-19ubuntu1 is installed
Depends: zlib1g (>= 1:1.2.0) but 1:1.2.3.4.dfsg-3ubuntu3 is installed
Depends: libmariadbclient16 (>= 5.3.0-mariadb101~natty) but it is not installed

Comment by Timour Katchaounov (Inactive) [ 2011-07-24 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
After the above errors, I accepted the suggestion of apt to run:
apt-get -f install

This command seemed to fix the problem. After this command I ran:
apt-get install mysql-client mysql-server
which installed some more packages.

Now I could start mariadb via
sudo /etc/init.d/mysql start.

Comment by Kristian Nielsen [ 2011-07-25 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
Timour: Your problem is not related to this bug. See instead lp:815198

Comment by Rasmus Johansson (Inactive) [ 2012-02-04 ]

Re: apt-get install mariadb-server-5.2 fails on Debian squeeze
I had the same, but fixed it:

~# apt-get install mariadb-server-5.2
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:
mariadb-server-5.2 : Depends: mariadb-client-5.2 (>= 5.2.10-mariadb107~squeeze) but it is not going to be installed
Depends: libmariadbclient16 (>= 5.1.21-1) but it is not going to be installed
Depends: mariadb-server-core-5.2 (>= 5.2.10-mariadb107~squeeze) but it is not going to be installed
PreDepends: mariadb-common
E: Broken packages

The problem is with mariadb-common:

root@testzarafa3:~# apt-get install mariadb-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mariadb-common is a virtual package provided by:
mysql-common 5.2.10-mariadb107~squeeze [Not candidate version]

To fix it:

root@testzarafa3:~# apt-get remove mysql-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libmysqlclient12 libmysqlclient14 libmysqlclient15-dev libmysqlclient15off mysql-common
0 upgraded, 0 newly installed, 5 to remove and 190 not upgraded.
After this operation, 28.2 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 178116 files and directories currently installed.)
Removing libmysqlclient12 ...
Removing libmysqlclient14 ...
Removing libmysqlclient15-dev ...
Removing libmysqlclient15off ...
Removing mysql-common ...
Processing triggers for man-db ...

and then it works:

~# apt-get install mariadb-server-5.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libdbd-mysql-perl libmariadbclient16 libmysqlclient16 mariadb-client-5.2 mariadb-client-core-5.2 mariadb-server-core-5.2 mysql-common
Suggested packages:
tinyca mariadb-test
The following NEW packages will be installed:
libdbd-mysql-perl libmariadbclient16 libmysqlclient16 mariadb-client-5.2 mariadb-client-core-5.2 mariadb-server-5.2 mariadb-server-core-5.2 mysql-common
0 upgraded, 8 newly installed, 0 to remove and 190 not upgraded.
Need to get 21.3 MB of archives.
After this operation, 47.8 MB of additional disk space will be used.

Comment by Rasmus Johansson (Inactive) [ 2012-02-28 ]

Launchpad bug id: 730557

Generated at Thu Feb 08 06:42:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.