package mysql-server-8.0 8.0.26-0ubuntu0.20.04.2 failed to install/upgrade: 已安装 mysql-server-8.0 软件包 pre-removal 脚本 子进程返回错误状态 1

Bug #1940278 reported by Epro Fymed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I can't remove the things that I downloaded from 'apt install mysql-server'

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: mysql-server-8.0 8.0.26-0ubuntu0.20.04.2
ProcVersionSignature: Ubuntu 5.11.0-27.29~20.04.1-generic 5.11.22
Uname: Linux 5.11.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
CasperMD5CheckResult: skip
Date: Tue Aug 17 18:48:02 2021
ErrorMessage: 已安装 mysql-server-8.0 软件包 pre-removal 脚本 子进程返回错误状态 1
InstallationDate: Installed on 2021-03-06 (163 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
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
MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] 符号连接的层数过多: '/etc/mysql/my.cnf'
MySQLVarLibDirListing: ['moha', 'aria_log.00000001', 'mysql', 'ibdata1', 'ib_logfile1', 'ib_logfile0', 'mysql_upgrade_info', 'performance_schema', 'debian-10.3.flag', 'ib_buffer_pool', 'aria_log_control', 'multi-master.info']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-5.11.0-27-generic root=UUID=21f4dc5c-4b29-4062-aeee-4c7fc777a12f ro quiet splash vt.handoff=7
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: mysql-8.0
Title: package mysql-server-8.0 8.0.26-0ubuntu0.20.04.2 failed to install/upgrade: 已安装 mysql-server-8.0 软件包 pre-removal 脚本 子进程返回错误状态 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Epro Fymed (eprofymed) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for taking the time to file a bug report.

The first thing I tried was to translate the error messages you posted, which seem to be in Chinese. I found out that one of the errors is:

MySQLConf.etc.mysql.my.cnf: Error: [Errno 40] Too many layers of symbolic links:'/etc/mysql/my.cnf'

This raised a flag for me, because /etc/mysql/my.cnf is not supposed to be a symbolic link by default.

Then, I looked at the log files that are attached to the bug. From the DpkgHistoryLog.txt it seems that you installed mysql-server first, then tried installing mariadb-server right after. Unfortunately this is not going to work, because both packages share files. In order to fully remove mysql-server, you need to run:

# apt-get purge mysql-server

I would also recommend you to investigate why your /etc/mysql/my.cnf file is a symbolic link, and perhaps even remove it before installing mariadb-server (if that's what you want to do, of course).

Since it seems likely to me that this is a local configuration problem,
rather than a bug in Ubuntu, I am marking this bug as 'Incomplete'.

However, if you believe that this is really a bug in Ubuntu, then we would
be grateful if you would provide a more complete description of the problem
with steps to reproduce, explain why you believe this is a bug in Ubuntu
rather than a problem specific to your system, and then change the bug
status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in mysql-8.0 (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mysql-8.0 (Ubuntu) because there has been no activity for 60 days.]

Changed in mysql-8.0 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.