package mysql-server-8.0 8.0.22-0ubuntu0.20.04.2 failed to install/upgrade: installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-8.0 (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
i'm trying to install wordpress but i keep getting errors.
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.22-
ProcVersionSign
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.8
Architecture: amd64
CasperMD5CheckR
Date: Sat Oct 31 08:37:54 2020
ErrorMessage: installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2020-08-23 (68 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Logs.var.
MySQLConf.
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLVarLibDirL
ProcCmdline: BOOT_IMAGE=
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.2ubuntu0.1
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.22-
UpgradeStatus: No upgrade log present (probably fresh install)
Thank you for taking the time to file a bug report.
By inspecting the logs I see that you tried to install MySQL and MariaDB together. As you might have noticed, they are incompatible with each other; therefore, when you try to install one of them, the other is automatically removed. However, this removal sometimes leaves behind some application- specific data that causes an error when the new package is installed on top of the old one.
Having said that, I investigated the problem further and was able to reproduce the error. If I start a Focal lxd container and do:
# apt install mariadb-server mariadb-client && apt install mysql-client-8.0 && apt install mysql-server && apt-get install --reinstall mysql-server && apt install mariadb- client- core-10. 3
The system will be left in this inconsistent state w.r.t. MySQL. Further attempts to remove/purge the mysql-server package failed, and even trying to inspect the status of mysqld.service did not work:
# systemctl status mysqld.service
Unit mysqld.service could not be found.
I am marking this bug as Triaged; we will have to further analize what the problem is.