在Linux服务器上卸载mysql时出错

在Linux服务器上卸载mysql时出错

我正在尝试卸载 Linux 服务器中的 mysql 4.1 包。

命令 :yum remove mysql mysql-server

它给出了错误:

    Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package mysql.i386 0:4.1.22-2.el4 set to be erased
---> Package mysql-server.i386 0:4.1.22-2.el4 set to be erased
--> Running transaction check
Setting up repositories
http://vault.centos.org/4.8/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, '\xe5\x90\x8d\xe5\x89\x8d\xe8\xa7\xa3\xe6\xb1\xba\xe6\x99\x82\xe3\x81\xae\xe4\xb8\x80\xe6\x99\x82\xe7\x9a\x84\xe3\x81\xaa\xe5\xa4\xb1\xe6\x95\x97')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: update
failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from update: [Errno 256] No more mirrors to try.

我也试过yum clean all

我们如何删除 mysql?

編輯:那么我需要先删除哪个包?

当我跑步时rpm -e mysql mysql-server它抛出了:

 Failed dependencies:
    libmysqlclient.so.14 is needed by (installed) mod_auth_mysql-2.6.1-2.2.i386
    libmysqlclient.so.14 is needed by (installed) php-mysql-4.3.9-3.26.i386
    libmysqlclient.so.14 is needed by (installed) dovecot-0.99.11-9.EL4.i386
    libmysqlclient.so.14 is needed by (installed) perl-DBD-MySQL-2.9004-3.1.centos4.i386
    libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) php-mysql-4.3.9-3.26.i386
    libmysqlclient.so.14(libmysqlclient_14) is needed by (installed) dovecot-0.99.11-9.EL4.i386
    libmysqlclient_r.so.14 is needed by (installed) MySQL-python-1.2.1_p2-1.el4.1.i386
    libmysqlclient_r.so.14(libmysqlclient_14) is needed by (installed) MySQL-python-1.2.1_p2-1.el4.1.i386
    mysql is needed by (installed) MySQL-python-1.2.1_p2-1.el4.1.i386
    mysql = 4.1.22-2.el4 is needed by (installed) mysql-devel-4.1.22-2.el4.i386

答案1

快捷方式:使用rpm -e <pkglist>而不是yum remove。它将完成相同的操作,但您可能必须继续rpm -e使用扩展的软件包列表重新发出命令,因为它不会自动为您解决和删除依赖软件包。

漫长的路:找出vault.centos.orgrepo 没有响应的原因。要么从配置中删除它,要么修复该文件/etc/yum.repos.d并重新发出yum remove命令。

相关内容