如何在没有`apt-get`和`dpkg`的情况下从Ubuntu 16.04强制删除MySQL和MariaDB? [英] How to forcefully remove MySQL and MariaDB from Ubuntu 16.04, without `apt-get` and `dpkg`?

查看:464
本文介绍了如何在没有`apt-get`和`dpkg`的情况下从Ubuntu 16.04强制删除MySQL和MariaDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于错误地卸载了 MariaDB ,我在 Ubuntu 16.04 中丢失了 MySQL MariaDB 的工作实例系统...

我已经严重破坏了依赖关系,以至于我无法使用apt-getdpkg ... <<>卸载 MySQL 或 MariaDB /p>

以下所有命令均失败:

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 ,但无法重新安装操作系统.

请帮助我.

解决方案

上帝存在! :D

通过输入以下内容解决了问题:

sudo apt-get -f install

没有任何其他参数

,然后通过以下方式显示所有软件包:

sudo dpkg -l | grep mariadb
sudo dpkg -l | grep mysql

并以正确的顺序删除有问题的软件包:

sudo apt-get --purge autoremove package_name

在完全删除所有有问题的软件包之后,我可以重新安装 MySQL 而没有任何问题...

感谢@YuriLachin的帮助.

By wrong uninstalling MariaDB, I've lost working instance of MySQL and MariaDB in my Ubuntu 16.04 system...

I've broken the dependencies so much, that I can not uninstall or install MySQL or MariaDB, using apt-get, or dpkg...

All the following commands failed:

apt-get [install -f] [update] [remove] [purge] [autorove] [clean] [check]

and options with dpkg such as:

dpkg --remove --force-remove-reinstreq mysql

also don't help me.

Manually downloading the package and attempting to install from a local file did not help.

For each installation, uninstallation or other attempt, I get almost the same result:

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.

Is there any different way to permanently remove any traces and remnants of MySQL and MariaDB from the operating system, so that I can reinstall MySQL itself?

I need to working with MySQL, but I can't reinstall the operating system.

Please help me.

解决方案

God exists! :D

The problem was solved by entering:

sudo apt-get -f install

without any other parameters

and later displaying all packages via:

sudo dpkg -l | grep mariadb
sudo dpkg -l | grep mysql

and removing problematic packages in the right order:

sudo apt-get --purge autoremove package_name

After the complete removal of all problematic packages, I could re-install MySQL without any problems...

Thank you @YuriLachin for your help.

这篇关于如何在没有`apt-get`和`dpkg`的情况下从Ubuntu 16.04强制删除MySQL和MariaDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆