码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-05-08 11:10:01      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:rpm --allmatchs 重复 包 -e 卸载

关于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位的库,所以就会有装两个包的问题。这是正常的。


本文出自 “天道酬勤” 博客,请务必保留此出处http://8855546.blog.51cto.com/8845546/1647268

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

标签:rpm --allmatchs 重复 包 -e 卸载

原文地址:http://8855546.blog.51cto.com/8845546/1647268

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!