![无法在 Ubuntu 20.04 中升级、卸载、重新安装、安装、删除或清除 MySQL 或 MariaDB](https://linux22.com/image/950459/%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%2020.04%20%E4%B8%AD%E5%8D%87%E7%BA%A7%E3%80%81%E5%8D%B8%E8%BD%BD%E3%80%81%E9%87%8D%E6%96%B0%E5%AE%89%E8%A3%85%E3%80%81%E5%AE%89%E8%A3%85%E3%80%81%E5%88%A0%E9%99%A4%E6%88%96%E6%B8%85%E9%99%A4%20MySQL%20%E6%88%96%20MariaDB.png)
我正在尝试升级 MySQL,但由于出现以下消息而无法升级:
The following packages have unmet dependencies:
mysql-server-8.0 : Depends: mysql-server-core-8.0 (= 8.0.31-0ubuntu0.20.04.1) but 8.0.31-0ubuntu0.20.04.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
这是 apt 安装的列表:
libmysqlclient20/xenial-security,now 5.7.33-0ubuntu0.16.04.1 amd64 [installed]
libmysqlclient21/focal-security,now 8.0.31-0ubuntu0.20.04.1 amd64 [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-client-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-client-core-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,automatic]
mysql-client/focal-security,now 8.0.31-0ubuntu0.20.04.1 all [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-common/focal,now 5.8+1.0.5ubuntu2 all [installed]
mysql-server-8.0/focal-security,now 8.0.31-0ubuntu0.20.04.1 amd64 [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
mysql-server-core-8.0/focal-updates,now 8.0.31-0ubuntu0.20.04.2 amd64 [installed,auto-removable]
mysql-server/focal-security,now 8.0.31-0ubuntu0.20.04.1 all [installed,upgradable to: 8.0.31-0ubuntu0.20.04.2]
php-mysql/focal,now 2:7.4+75 all [installed,automatic]
php7.4-mysql/focal-updates,focal-security,now 7.4.3-4ubuntu2.15 amd64 [installed,automatic]
这是 dpkg 安装列表:
||/ Name Version Architecture Description
+++-=====================-=======================-============-===================================================================
ii mysql-client 8.0.31-0ubuntu0.20.04.1 all MySQL database client (metapackage depending on the latest version)
un mysql-client-5.7 <none> <none> (no description available)
ii mysql-client-8.0 8.0.31-0ubuntu0.20.04.2 amd64 MySQL database client binaries
un mysql-client-core-5.7 <none> <none> (no description available)
ii mysql-client-core-8.0 8.0.31-0ubuntu0.20.04.2 amd64 MySQL database core client binaries
ii mysql-common 5.8+1.0.5ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.cnf
un mysql-common-5.6 <none> <none> (no description available)
ii mysql-server 8.0.31-0ubuntu0.20.04.1 all MySQL database server (metapackage depending on the latest version)
un mysql-server-5.5 <none> <none> (no description available)
un mysql-server-5.7 <none> <none> (no description available)
pFR mysql-server-8.0 8.0.31-0ubuntu0.20.04.1 amd64 MySQL database server binaries and system database setup
un mysql-server-core-5.7 <none> <none> (no description available)
ii mysql-server-core-8.0 8.0.31-0ubuntu0.20.04.2 amd64 MySQL database server binaries
但我清除了所有mysql*
文件libmysql*
夹和/var/dpkg/lib/info
文件 /var/cache/apt
有任何想法吗?