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

Bug #1902348 reported by Enitan Yusuf
8
This bug affects 1 person
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-0ubuntu0.20.04.2
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.8
Architecture: amd64
CasperMD5CheckResult: skip
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.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLVarLibDirListing: ['ib_buffer_pool', 'mysql_upgrade_info', 'mysite', 'multi-master.info', 'ib_logfile0', 'wpdb', 'craftedBeauty', 'aria_log.00000001', 'ibdata1', 'debian-10.3.flag', 'mysql', 'aria_log_control', 'performance_schema', 'ib_logfile1']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.4.0-48-generic root=UUID=54bd75e7-f966-4602-8a3c-8e0fb45f1116 ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.1
SourcePackage: mysql-8.0
Title: 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
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Enitan Yusuf (cocokeston) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

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.

Changed in mysql-8.0 (Ubuntu):
status: New → Triaged
Revision history for this message
Robie Basak (racb) wrote :

I think this is a duplicate of bug 1490071. You can't switch between MySQL and MariaDB relying on the package manager alone; you have to sort the mess out manually.

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

Other bug subscribers