卸载rpm包遭遇error: specifies multiple packages
执行sudo rpm -e libdrizzle-0.8-6.el5,发现如下问题:
error: "libdrizzle-0.8-6.el5" specifies multiple packages
添加参数:--allmatches
–allmatches Remove all versions of the package which match PACKAGE_NAME. Normally an error is issued if PACKAGE_NAME matches multiple packages.
sudo rpm -e --allmatches libdrizzle-0.8-6.el5
error: Failed dependencies:
libdrizzle.so.0()(64bit) is needed by (installed) libdrizzle-devel-0.8-6.el5.x86_64
libdrizzle = 0.8-6.el5 is needed by (installed) libdrizzle-devel-0.8-6.el5.i386
libdrizzle = 0.8-6.el5 is needed by (installed) libdrizzle-devel-0.8-6.el5.x86_64
libdrizzle.so.0 is needed by (installed) libdrizzle-devel-0.8-6.el5.i386
然后逐个删除即可。
sudo rpm -e --allmatches libdrizzle-0.8-6.el5
也可考虑这个方法(不删除依赖的包):
rpm -e --nodeps 包名