mysql - 尝试在 Ubuntu 20.04 中安装 mysql 时未满足的依赖项

标签 mysql ubuntu

我尝试在 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/

相关文章:

消费者-生产者,断言失败

ubuntu - Pyglets Window.on_key_press 和 Window.on_key_release 受 ubuntu 12.10 上键重复的影响,统一

c++ - Message Queue 不断发送/接收垃圾

python - 如何隐藏主窗口标题栏并在 kivy 框架中放置透明背景?

mysql - Rails 中每个循环的帮助。尝试统计每个表中的数据。

mysql - 如何提供对数据库子集的公共(public)访问?

ubuntu - 尽管可以在 Windows 上运行,但 Ubuntu 上的 X11 转发错误

mysql - 查询未过滤重复行

php - MySQL 增加查看计数查询 - 非常慢

PHP 和 Money,将钱转换为美分