在 Ubuntu 中卸载 MySQL

在 Ubuntu 中卸载 MySQL

我刚刚尝试使用以下方法删除 MySQL 客户端

apt-get remove mysql-client-5.1

但出现错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libnet-daemon-perl libhtml-template-perl libdbi-perl mysql-client-core-5.1
  libdbd-mysql-perl libplrpc-perl mysql-server-core-5.1
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  mysql-client-5.1 mysql-server-5.1
0 upgraded, 0 newly installed, 2 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 34.8MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 29745 files and directories currently installed.)
Removing mysql-server-5.1 ...
mysql stop/waiting
Removing mysql-client-5.1 ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up python-setuptools (0.6.10-4ubuntu1) ...
/var/lib/dpkg/info/python-setuptools.postinst: 10: pycentral: not found
dpkg: error processing python-setuptools (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 python-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)

如何完成删除?

答案1

无论出于什么原因,它似乎pycentral并未安装在您的系统上,尽管 python-setuptools 依赖于它。

apt-get install -y python-central
apt-get remove -y mysql-client-5.1

应该可以解决问题并删除 MySQL。

答案2

这与 MySQL 无关。您上次运行 时,有些软件包尚未完成配置apt-get。您遇到的问题是 python 未正确安装。使用 安装 pycentralapt-get install pycentral然后应该可以解决您的问题。

答案3

apt-get的开关-f会尝试解决问题。

apt-get -f install

从:http://www.linux.com/archive/feed/48910

运行 apt-get -f install 或 apt-get -f remove 而不指定包,以强制完成包安装。

相关内容