当前位置: > Linux故障 >

卸载rpm包遭遇error: specifies multiple packages

时间:2015-08-03 00:40来源:linux.it.net.cn 作者:IT

rpm -qa | grep mysql
mysqlclient10-3.23.58-4.RHEL4.1
mysql-4.1.20-2.RHEL4.1
mysql-4.1.20-2.RHEL4.1
mysqlclient10-3.23.58-4.RHEL4.1

尝试卸载:

rpm -e mysqlclient10-3.23.58-4.RHEL4.1
error: “mysqlclient10-3.23.58-4.RHEL4.1″ 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.


rpm -e –allmatches mysqlclient10-3.23.58-4.RHEL4.1
rpm -e –allmatches mysql-4.1.20-2.RHEL4.1
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave

ok,系统自带的旧版本MySQL卸载完成。

(责任编辑:IT)
------分隔线----------------------------