在卸载RPM包时,报错specifies multiple packages;通过查询看到同一个包安装了两次,所以报错了,需要指定包。

[root@fanyk ~]# rpm -qa |grep curl

curl-7.15.5-17.el5_9

curl-devel-7.15.5-17.el5_9

TWWcurl715-7.15.1-2

curl-devel-7.15.5-17.el5_9

curl-7.15.5-17.el5_9

TWWcurl715-doc-7.15.1-2

TWWcurl715-man-7.15.1-2

[root@fanyk ~]# rpm -e curl-7.15.5-17.el5_9

error: "curl-7.15.5-17.el5_9" specifies multiple packages

[root@fanyk ~]# 

在卸载时,加上参数allmatches即可,这代表卸载所有匹配的包。

[root@fanyk ~]# rpm -e curl-7.15.5-17.el5_9 --allmatches

error: Failed dependencies:

        libcurl.so.3()(64bit) is needed by (installed) curl-devel-7.15.5-17.el5_9.x86_64

        libcurl.so.3()(64bit) is needed by (installed) php-cli-5.1.6-45.el5_11.x86_64

        libcurl.so.3()(64bit) is needed by (installed) php-5.1.6-45.el5_11.x86_64

        libcurl.so.3()(64bit) is needed by (installed) gnupg-1.4.5-18.el5_10.1.x86_64

        curl = 7.15.5-17.el5_9 is needed by (installed) curl-devel-7.15.5-17.el5_9.i386

        curl = 7.15.5-17.el5_9 is needed by (installed) curl-devel-7.15.5-17.el5_9.x86_64

        libcurl.so.3 is needed by (installed) curl-devel-7.15.5-17.el5_9.i386

[root@fanyk ~]#

卸载时还是报错,因为依赖关系,再加参数nodeps ,强制卸载。

[root@fanyk ~]# rpm -e curl-7.15.5-17.el5_9 --allmatches --nodeps

[root@fanyk ~]# 

[root@fanyk ~]# 

[root@fanyk ~]#  rpm -qa |grep curl

curl-devel-7.15.5-17.el5_9

TWWcurl715-7.15.1-2

curl-devel-7.15.5-17.el5_9

TWWcurl715-doc-7.15.1-2

TWWcurl715-man-7.15.1-2

[root@fanyk ~]# rpm -e curl-devel-7.15.5-17.el5_9

error: "curl-devel-7.15.5-17.el5_9" specifies multiple packages

[root@fanyk ~]# 

[root@fanyk ~]# rpm -e curl-devel-7.15.5-17.el5_9 --allmatches

[root@fanyk ~]#  rpm -qa |grep curl

TWWcurl715-7.15.1-2

TWWcurl715-doc-7.15.1-2

TWWcurl715-man-7.15.1-2

[root@fanyk ~]#