【发布时间】:2018-11-07 11:38:42
【问题描述】:
由于错误卸载 MariaDB,我在我的 Ubuntu 16.04 中丢失了 MySQL 和 MariaDB 的工作实例系统...
我已经破坏了如此多的依赖关系,以至于我无法卸载或安装 MySQL 或 MariaDB,使用 apt-get 或 dpkg...
以下所有命令均失败:
apt-get [install -f] [update] [remove] [purge] [autorove] [clean] [check]
以及带有dpkg 的选项,例如:
dpkg --remove --force-remove-reinstreq mysql
也别帮我。
手动下载软件包并尝试从本地文件安装没有帮助。
对于每次安装、卸载或其他尝试,我得到几乎相同的结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
mariadb-client : Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mariadb-server-10.0 : PreDepends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Depends: mariadb-client-10.0 (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
Breaks: mysql-server
mariadb-server-core-10.0 : Depends: mariadb-common (>= 10.0.34-0ubuntu0.16.04.1) but it is not installed
mysql-server : Depends: mysql-community-server (= 5.7.22-1ubuntu16.04) but it is not installed
E: Unmet dependencies. Try using -f.
有什么不同的方法可以从操作系统中永久删除 MySQL 和 MariaDB 的任何痕迹和残余,以便我可以重新安装 MySQL 本身?
我需要使用 MySQL,但我无法重新安装操作系统。
请帮帮我。
【问题讨论】:
-
最好将问题发送给serverfaul.com。运行
dpkg --audit以查找损坏的内容。然后运行dpkg --list|grep -i mysql和dpkg --list|grep -i mariadb,查看第一个(状态)列,并可选择检查带有dpkg-info -s <name-of-package>的某些包的详细状态。然后您可以尝试使用dpkg -remove --force-remove-reinstreq <package-list>删除找到的mysql/mariadb 相关包。作为一种解决方法,您可以在不安装 mysql 的情况下始终在 docker 容器中运行 mysq。 -
@YuriLachin 感谢您的帮助,请插入您的评论内容作为此问题的答案,以便我可以给您声誉积分。
标签: mysql dependencies mariadb ubuntu-16.04 dependency-management