Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop package installed

Bug #1047337 reported by David Favor on 2012-09-07
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MariaDB
New
Undecided
Sergei Golubchik

Bug Description

This bug blocks installation/upgrade of latest MariaDB packages if mariadb-test is requested.

This means if package mytop is installed and mariadb-test is installed, an upgrade completely
breaks MariaDB upgrade so files are partially installed and database will not start.

The quick fix is to issue 'dpkg --purge mytop' at the command line, then go through the
install/upgrade procedure again.

See log below for details.

dpkg: error processing /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb (--unpack):
    trying to overwrite '/usr/bin/mytop', which is also in package mytop 1.6-6

This error is thrown when the mytop package has already been installed.

Suggest adding conflict resolution to MariaDB packaging which tests for the existence of /usr/bin/mytop
and if it exists execute 'dpkg -S /usr/bin/mytop' to determine the package owning /usr/bin/mytop, then
direct the user to manually deinstall this package (dpkg --purge mytop) before proceeding.
_______

net1# pkg-update
+ apt-get -qq update
+ aptitude upgrade
The following packages will be upgraded:
  libmariadbclient-dev libmariadbclient18 libmariadbd-dev libmysqlclient18 mariadb-client mariadb-client-5.5
  mariadb-client-core-5.5 mariadb-common mariadb-server mariadb-server-5.5 mariadb-server-core-5.5 mariadb-test
  mariadb-test-5.5 mysql-common
14 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.3 MB of archives. After unpacking 1,671 kB will be used.
Do you want to continue? [Y/n/?]
Get: 1 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server all 5.5.27-mariadb1~precise [2,958 B]
Get: 2 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-test all 5.5.27-mariadb1~precise [2,768 B]
Get: 3 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client all 5.5.27-mariadb1~precise [2,832 B]
Get: 4 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mysql-common all 5.5.27-mariadb1~precise [8,776 B]
Get: 5 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-common all 5.5.27-mariadb1~precise [3,274 B]
Get: 6 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient18 amd64 5.5.27-mariadb1~precise [809 kB]
Get: 7 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmysqlclient18 amd64 5.5.27-mariadb1~precise [2,922 B]
Get: 8 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-core-5.5 amd64 5.5.27-mariadb1~precise [1,798 kB]
Get: 9 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-test-5.5 all 5.5.27-mariadb1~precise [64.8 MB]
Get: 10 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-client-5.5 amd64 5.5.27-mariadb1~precise [5,082 kB]
Get: 11 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-core-5.5 amd64 5.5.27-mariadb1~precise [5,205 kB]
Get: 12 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main mariadb-server-5.5 amd64 5.5.27-mariadb1~precise [17.7 MB]
Get: 13 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbclient-dev amd64 5.5.27-mariadb1~precise [1,834 kB]
Get: 14 http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu/ precise/main libmariadbd-dev amd64 5.5.27-mariadb1~precise [2,894 B]
Fetched 97.3 MB in 28s (3,382 kB/s)
Preconfiguring packages ...
(Reading database ... 132154 files and directories currently installed.)
Preparing to replace mariadb-server 5.5.25-mariadb1~precise (using .../mariadb-server_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-server ...
Preparing to replace mariadb-test 5.5.25-mariadb1~precise (using .../mariadb-test_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-test ...
Preparing to replace mariadb-client 5.5.25-mariadb1~precise (using .../mariadb-client_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-client ...
Preparing to replace mysql-common 5.5.25-mariadb1~precise (using .../mysql-common_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mysql-common ...
Preparing to replace mariadb-common 5.5.25-mariadb1~precise (using .../mariadb-common_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-common ...
Preparing to replace libmariadbclient18 5.5.25-mariadb1~precise (using .../libmariadbclient18_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement libmariadbclient18 ...
Preparing to replace libmysqlclient18 5.5.25-mariadb1~precise (using .../libmysqlclient18_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement libmysqlclient18 ...
Preparing to replace mariadb-client-core-5.5 5.5.25-mariadb1~precise (using .../mariadb-client-core-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-client-core-5.5 ...
Preparing to replace mariadb-test-5.5 5.5.25-mariadb1~precise (using .../mariadb-test-5.5_5.5.27-mariadb1~precise_all.deb) ...
Unpacking replacement mariadb-test-5.5 ...
Preparing to replace mariadb-client-5.5 5.5.25-mariadb1~precise (using .../mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-client-5.5 ...
dpkg: error processing /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mytop', which is also in package mytop 1.6-6
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace mariadb-server-core-5.5 5.5.25-mariadb1~precise (using .../mariadb-server-core-5.5_5.5.27-mariadb1~precise_amd64.deb) ...
Unpacking replacement mariadb-server-core-5.5 ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/mariadb-client-5.5_5.5.27-mariadb1~precise_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up mariadb-server (5.5.27-mariadb1~precise) ...
Setting up mariadb-client (5.5.27-mariadb1~precise) ...
dpkg: dependency problems prevent configuration of mariadb-test-5.5:
 mariadb-test-5.5 depends on mariadb-server-5.5 (= 5.5.27-mariadb1~precise); however:
  Version of mariadb-server-5.5 on system is 5.5.25-mariadb1~precise.
 mariadb-test-5.5 depends on mariadb-client-5.5 (= 5.5.27-mariadb1~precise); however:
  Version of mariadb-client-5.5 on system is 5.5.25-mariadb1~precise.
dpkg: error processing mariadb-test-5.5 (--configure):
 dependency problems - leaving unconfigured
Setting up mysql-common (5.5.27-mariadb1~precise) ...
Installing new version of config file /etc/mysql/my.cnf ...
Setting up mariadb-common (5.5.27-mariadb1~precise) ...
dpkg: dependency problems prevent configuration of mariadb-test:
 mariadb-test depends on mariadb-test-5.5; however:
  Package mariadb-test-5.5 is not configured yet.
dpkg: error processing mariadb-test (--configure):
 dependency problems - leaving unconfigured
Setting up libmysqlclient18 (5.5.27-mariadb1~precise) ...
Setting up libmariadbclient18 (5.5.27-mariadb1~precise) ...
Setting up mariadb-client-core-5.5 (5.5.27-mariadb1~precise) ...
Setting up mariadb-server-core-5.5 (5.5.27-mariadb1~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 mariadb-test-5.5
 mariadb-test

Current status: 1 broken [+1], 4 updates [-10].
+ apt-get -y autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
+ apt-get -y autoremove
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:
 mariadb-test-5.5 : Depends: mariadb-server-5.5 (= 5.5.27-mariadb1~precise) but 5.5.25-mariadb1~precise is installed
                    Depends: mariadb-client-5.5 (= 5.5.27-mariadb1~precise) but 5.5.25-mariadb1~precise is installed
E: Unmet dependencies. Try using -f.

David Favor (davidfavor) on 2012-09-07
summary: - Ubuntu packaging mariadb-client-5.5.27 and mytop conflic
+ Ubuntu nmariadb-client-5.5.27 upgrade leaves MariaDB unstartable
summary: - Ubuntu nmariadb-client-5.5.27 upgrade leaves MariaDB unstartable
+ Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable
summary: - Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable
+ Ubuntu mariadb-client-5.5.27 upgrade leaves MariaDB unstartable if mytop
+ package installed
Elena Stepanova (elenst) wrote :

Hi David,

Was it different with 5.5.25, or did you install the mytop package when 5.5.25 had already been installed?

Changed in maria:
assignee: nobody → Sergei (sergii)
milestone: none → 5.5
David Favor (davidfavor) wrote :

Fix verified on another identical server.

apt-get --purge remove mytop && apt-get -qq update && aptitude upgrade

David Favor (davidfavor) wrote :

It appears I installed mariadb-5.5.25 then mytop.

Then did an upgrade when mariadb-5.5.27 released.

Omega8.cc (g-admin-omega8-cc) wrote :

The same issue on a few Debian Squeeze servers we have tried to upgrade, all running mariadb-5.5.25 and mytop installed.

To recover and install MariaDB again it was required to not only remove & purge mytop, but also rm -f /usr/bin/mytop because it was not really deleted for some reason. It looks like mytop bundled with MariaDB doesn't check and upgrade existing mytop package properly.

dpkg: error processing /var/cache/apt/archives/mytop_1.6-6_all.deb (--unpack):
 trying to overwrite '/usr/bin/mytop', which is also in package mariadb-client-5.5 5.5.27-mariadb1~squeeze
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/mytop_1.6-6_all.deb
Setting up libconfig-inifiles-perl (2.52-1) ...
Setting up libmariadbclient-dev (5.5.27-mariadb1~squeeze) ...
Setting up libmariadbd-dev (5.5.27-mariadb1~squeeze) ...

David Favor (davidfavor) wrote :

Sounds like the mytop package has problems on Debian.

The mytop executable is deleted (as expected) when the Ubuntu package is removed.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers