我尝试在 Ubuntu 20.04 中安装/删除并重新安装/修复 Mysql 和 Workbench,但总是收到以下消息:
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (8.0.20-2ubuntu20.04).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libmysqlclient21 : Depends: mysql-common (>= 8.0.20-2ubuntu20.04) but 5.8+1.0.5ubuntu2 is to be installed
mysql-client : Depends: mysql-community-client (= 8.0.20-2ubuntu20.04) but it is not installable
mysql-community-test : Depends: mysql-community-server (= 8.0.20-2ubuntu20.04) but it is not installable
Depends: mysql-community-client (= 8.0.20-2ubuntu20.04) but it is not installable
Depends: libjson-perl but it is not going to be installed
Depends: mysql-community-server-core but it is not installable
mysql-server : Depends: mysql-community-server (= 8.0.20-2ubuntu20.04) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
当我尝试 sudo apt --fix-broken install 时,会出现:
The following packages have unmet dependencies:
libmysqlclient21 : Depends: mysql-common (>= 8.0.20-2ubuntu20.04) but 5.8+1.0.5ubuntu2 is installed
mysql-client : Depends: mysql-community-client (= 8.0.20-2ubuntu20.04) but it is not installable
mysql-community-test : Depends: mysql-community-server (= 8.0.20-2ubuntu20.04) but it is not installable
Depends: mysql-community-client (= 8.0.20-2ubuntu20.04) but it is not installable
Depends: libjson-perl but it is not installed
Depends: mysql-community-server-core but it is not installable
mysql-server : Depends: mysql-community-server (= 8.0.20-2ubuntu20.04) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
对不起,我确定有一个简单的解决方案..但我找不到。
最佳答案
尝试申请sudo apt autoremove libmysqlclient21 mysql-client mysql-community-test mysql-server
如果出现任何其他新的未满足的依赖项,请在上述命令的末尾附加该包。
这是因为当有几个包相互依赖时,只删除一个会破坏依赖计数。
因此,同时移除它们可确保不会损坏包装。
如果您发现任何其他问题,请还原
关于mysql - 尝试在 Ubuntu 20.04 中安装 mysql 时未满足的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62289567/