I'm trying to upgrade my server and I'm in a weird state where mariadb-server-core-10.3 and mariadb-server-10.3 1:10.3.30+maria~bionic is conflicting with each other, and possibly maybe involving mysql-server-core-5.5.
This is a Ubuntu 20 server and has gone through a couple of do-release-upgrades. I suspect a major issue is that MariaDB was installed when it wasn't part of Ubuntu's apt, and I had to put in sources manually in /etc/apt/sources.list.d
When trying to upgrade, it complains about dependencies and suggests running apt --fix-broken install. The issues are nicely collected when I do this.
root@host:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libllvm11 libmariadb3 php8.0-curl php8.0-gd php8.0-mbstring php8.0-ssh2 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: mariadb-server-10.3 mariadb-server-core-10.3 Suggested packages: mailx mariadb-test tinyca The following packages will be upgraded: mariadb-server-10.3 mariadb-server-core-10.3 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 28 not fully installed or removed. Need to get 0 B/10.2 MB of archives. After this operation, 717 kB disk space will be freed. Do you want to continue? [Y/n] Y Preconfiguring packages ... (Reading database ... 58001 files and directories currently installed.) Preparing to unpack .../mariadb-server-core-10.3_1%3a10.3.34-0ubuntu0.20.04.1_amd64.deb ... Unpacking mariadb-server-core-10.3 (1:10.3.34-0ubuntu0.20.04.1) over (1:10.3.30+maria~bionic) ... dpkg: error processing archive /var/cache/apt/archives/mariadb-server-core-10.3_1%3a10.3.34-0ubuntu0.20.04.1_amd64.deb (--unpack): trying to overwrite '/usr/bin/my_print_defaults', which is also in package mariadb-server-10.3 1:10.3.30+maria~bionic dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) dpkg: regarding .../mariadb-server-10.3_1%3a10.3.34-0ubuntu0.20.04.1_amd64.deb containing mariadb-server-10.3: mariadb-server-10.3 conflicts with mysql-server-core-5.5 mariadb-server-core-10.3 provides mysql-server-core-5.5 and is present and installed.
mysql-server-core-5.5 doesn't seem to be installed though.
root@host:~# apt list --installed | grep mysql WARNING: apt does not have a stable CLI interface. Use with caution in scripts. libdbd-mysql-perl/focal,now 4.050-3 amd64 [installed,auto-removable] libmysqlclient21/focal-updates,focal-security,now 8.0.29-0ubuntu0.20.04.3 amd64 [installed,automatic] mysql-common/now 1:10.3.30+maria~bionic all [installed,local] php7.4-mysql/focal,now 1:7.4.30-3+ubuntu20.04.1+deb.sury.org+1 amd64 [installed] php8.0-mysql/focal,now 1:8.0.20-2+ubuntu20.04.1+deb.sury.org+1 amd64 [installed] postfix-mysql/focal-updates,now 3.4.13-0ubuntu1.2 amd64 [installed]
And it seems mysql-common is being depended upon by other packages. mysql-client is and mysql-server aren't installed, and if I try to remove mysql-common, I get this:
root@host:~# apt-get purge mysql-common Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libmysqlclient21 : Depends: mysql-common (>= 5.5) but it is not going to be installed mariadb-common : Depends: mysql-common (>= 5.6.25) but it is not going to be installed mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.34-0ubuntu0.20.04.1) but 1:10.3.30+maria~bionic is to be installed
So if I'm reading the last line right, there's some sort of mariadb-server-10.3 and 1:10.3.30+maria~bionic? I do have mariadb sources in /etc/apt/sources.list.d.
mariadb.list mariadb.list.distUpgrade mariadb.list.save
# MariaDB Server # To use a different major version of the server, or to pin to a specific minor version, change URI below. # deb [arch=amd64,arm64] https://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu focal main # disabled on upgrade to focal deb [arch=amd64,arm64 lang=none target-=CNF] https://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu bionic main/debug # MariaDB MaxScale # To use the latest stable release of MaxScale, use "latest" as the version # To use the latest beta (or stable if no current beta) release of MaxScale, use "beta" as the version # deb [arch=amd64] https://dlm.mariadb.com/repo/maxscale/latest/apt focal main # disabled on upgrade to focal # MariaDB Tools # deb [arch=amd64] http://downloads.mariadb.com/Tools/ubuntu focal main # disabled on upgrade to focal
Any ideas on how to fix this safely? Thanks!