Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5
Description
After MySQL was upgraded to 5.7.31 in Bionic repos, cross-grade from pre-installed MySQL 5.7.30 to MariaDB 10.5 doesn't work anymore.
These are pre-installed packages:
$ dpkg -l | grep -iE 'mysql|maria'
|
ii mysql-client-5.7 5.7.30-0ubuntu0.18.04.1 amd64 MySQL database client binaries
|
ii mysql-client-core-5.7 5.7.30-0ubuntu0.18.04.1 amd64 MySQL database core client binaries
|
ii mysql-common 5.8+1.0.4 all MySQL database common files, e.g. /etc/mysql/my.cnf
|
ii mysql-server 5.7.30-0ubuntu0.18.04.1 all MySQL database server (metapackage depending on the latest version)
|
ii mysql-server-5.7 5.7.30-0ubuntu0.18.04.1 amd64 MySQL database server binaries and system database setup
|
ii mysql-server-core-5.7 5.7.30-0ubuntu0.18.04.1 amd64 MySQL database server binaries
|
Specifically, this doesn't work:
$ sudo apt-get install mariadb-server
|
...
|
The following packages have unmet dependencies:
|
mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.5+maria~bionic) but it is not going to be installed
|
E: Unable to correct problems, you have held broken packages.
|
This also doesn't work:
$ sudo apt-get install mariadb-server-10.5
|
...
|
The following packages have unmet dependencies:
|
mariadb-server-10.5 : Depends: mariadb-client-10.5 (>= 1:10.5.5+maria~bionic) but it is not going to be installed
|
Depends: mariadb-server-core-10.5 (>= 1:10.5.5+maria~bionic) but it is not going to be installed
|
E: Unable to correct problems, you have held broken packages.
|
But this works:
$ sudo apt-get install mariadb-server-core-10.5
|
Reading package lists... Done
|
Building dependency tree
|
Reading state information... Done
|
The following packages were automatically installed and are no longer required:
|
libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
|
libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7
|
Use 'sudo apt autoremove' to remove them.
|
The following additional packages will be installed:
|
libpcre2-8-0 mariadb-common mysql-client-5.7
|
The following packages will be REMOVED:
|
mysql-server mysql-server-5.7 mysql-server-core-5.7
|
The following NEW packages will be installed:
|
libpcre2-8-0 mariadb-common mariadb-server-core-10.5
|
The following packages will be upgraded:
|
mysql-client-5.7
|
1 upgraded, 3 newly installed, 3 to remove and 87 not upgraded.
|
Need to get 2,127 kB/9,092 kB of archives.
|
After this operation, 48.8 MB disk space will be freed.
|
Do you want to continue? [Y/n]
|
Also, if MySQL first upgraded to 5.7.31, after that installation of MariaDB works:
$ sudo apt-get install mysql-server
|
Reading package lists... Done
|
Building dependency tree
|
Reading state information... Done
|
The following packages will be upgraded:
|
mysql-server
|
1 upgraded, 0 newly installed, 0 to remove and 90 not upgraded.
|
Need to get 9,948 B of archives.
|
After this operation, 0 B of additional disk space will be used.
|
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 mysql-server all 5.7.31-0ubuntu0.18.04.1 [9,948 B]
|
Fetched 9,948 B in 0s (287 kB/s)
|
(Reading database ... 67597 files and directories currently installed.)
|
Preparing to unpack .../mysql-server_5.7.31-0ubuntu0.18.04.1_all.deb ...
|
Unpacking mysql-server (5.7.31-0ubuntu0.18.04.1) over (5.7.30-0ubuntu0.18.04.1) ...
|
Setting up mysql-server (5.7.31-0ubuntu0.18.04.1) ...
|
|
$ sudo apt-get install mariadb-server
|
Reading package lists... Done
|
Building dependency tree
|
Reading state information... Done
|
The following package was automatically installed and is no longer required:
|
libevent-core-2.1-6
|
Use 'sudo apt autoremove' to remove it.
|
The following additional packages will be installed:
|
galera-4 libdbd-mysql-perl libdbi-perl libmariadb3 libmysqlclient20 libpcre2-8-0 libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server-10.5
|
mariadb-server-core-10.5 socat
|
Suggested packages:
|
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl mailx mariadb-test
|
The following packages will be REMOVED:
|
mysql-client-5.7 mysql-client-core-5.7 mysql-server mysql-server-5.7 mysql-server-core-5.7
|
The following NEW packages will be installed:
|
galera-4 libdbd-mysql-perl libdbi-perl libmariadb3 libmysqlclient20 libpcre2-8-0 libterm-readkey-perl mariadb-client-10.5 mariadb-client-core-10.5 mariadb-common mariadb-server
|
mariadb-server-10.5 mariadb-server-core-10.5 socat
|
0 upgraded, 14 newly installed, 5 to remove and 86 not upgraded.
|
Need to get 11.5 MB/25.5 MB of archives.
|
After this operation, 49.2 MB of additional disk space will be used.
|
...
|
Thanks for reporting! These "Depends: XYZ but it is not going to be installed" type of errors are quite hard to debug and the apt error messages are quite unhelpful.
It could potentially be related to https://jira.mariadb.org/browse/MDEV-22735.
The changelogs for Ubuntu can be found at https://launchpad.net/ubuntu/bionic/+source/mysql-5.7. The changelog at https://launchpad.net/ubuntu/+source/mysql-5.7/5.7.31-0ubuntu0.18.04.1 does not state any packaging changes, nor does the diff http://launchpadlibrarian.net/489331240/mysql-5.7_5.7.30-0ubuntu0.18.04.1_5.7.31-0ubuntu0.18.04.1.diff.gz contain any debian/control changes.
Automatic testing at https://salsa.debian.org/mariadb-team/mariadb-server/-/jobs/903736 installed from Debian Sid version 5.7.26-1+b1 and upgraded to MariaDB 10.5.5 without problems.
Maybe faust could try to isolate this case and track down what is going on?