关于rpm包卸载出现重复包的问题

关于rpm包卸载出现重复包的问题


1 rpm -qa rpm_name 有时候会出现重复的包

amp1:~/dir # rpm -qa zlib
zlib-1.2.3-141.1
zlib-1.2.3-106.34
##zlib包很危险,不卸载

2 rpm -e rpm_name 无法全部卸载,有时候只会卸载一个

amp1:~/dir # rpm -e zlib
error: "zlib" specifies multiple packages

3 rpm -e --allmatches --nodeps rpm_name 会自动匹配rpm_name已安装的所有版本,并卸载

amp1:~/dir # rpm -e --allmatches --nodeps zlib
You have new mail in /var/mail/root
amp1:~/dir #
##现在不报错了,但是问题来了

4 把zlib全部卸载了之后,哈哈,逗B了^_^

amp1:/home/soft/software/myshell # ./run_install_1.sh 
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
rpm  -ivh  zlib-1.2.3-141.1.x86_64.rpm --force is error

5 这只是个例子,所以记得不要卸载了zlib,很危险

6 对于其他的安装包,如果出现specifies multiple packages导致不能卸载的话,就可以用 

 rpm --help | grep allmatches
 rpm --allmatches rpm_name #选项进行处理。

7 有的时候64位系统也需要兼容32位的库,所以就会有装两个包的问题。这是正常的。


你可能感兴趣的:(rpm,重复,allmatchs)