rpm卸载包遭遇 specifies multiple packages 错误

使用 rpm删除软件时报错如下:

[root@hostxxlidan]# rpm -qa |grep -i mysql
mysql-devel-5.0.95-5.el5_9
mysql-devel-5.0.95-5.el5_9
MySQL-shared-5.5.34-1.rhel5
mysql-5.0.95-5.el5_9
mysql-server-5.0.95-5.el5_9
MySQL-shared-compat-5.5.34-1.rhel5
perl-DBD-MySQL-3.0007-2.el5
mysql-5.0.95-5.el5_9

然后执行删除:

[root@host74 lidan]# rpm -e mysql-5.0.95-5.el5_9
error: "mysql-5.0.95-5.el5_9" specifies multiple packages

上面确实两个包,故报这个问题很正常。

man rpm 发现有一个参数 --allmatches



       --allmatches
              Remove all versions of the package which match PACKAGE_NAME. Normally an error is issued if PACKAGE_NAME
              matches multiple packages.

然后执行

[root@hostxxx lidan]# rpm -e --allmatches   mysql-5.0.95-5.el5_9
error: Failed dependencies:
        mysql = 5.0.95-5.el5_9 is needed by (installed) mysql-devel-5.0.95-5.el5_9.x86_64
        mysql = 5.0.95-5.el5_9 is needed by (installed) mysql-devel-5.0.95-5.el5_9.i386
        libmysqlclient.so.15 is needed by (installed) mysql-devel-5.0.95-5.el5_9.i386
        libmysqlclient_r.so.15 is needed by (installed) mysql-devel-5.0.95-5.el5_9.i386

还有依赖再去依赖

rpm -e --allmatches --nodeps  mysql-5.0.95-5.el5_9

转载于:https://www.cnblogs.com/liang545621/p/7528525.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值