我试图在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安装时,出现此结果:
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
对不起,我确定有一个简单的解决方案。但是我找不到它。
答案 0 :(得分:0)
尝试申请
sudo apt autoremove libmysqlclient21 mysql-client mysql-community-test mysql-server
如果出现任何其他新的未满足的依赖关系,请在上述命令的末尾附加软件包。
之所以显示此信息,是因为当有多个相互依赖的程序包时,仅删除其中一个将破坏依赖关系计数。
因此,同时删除它们可确保不会损坏软件包。
如果发现其他问题,请还原