注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

Wei Ding blog

 
 
 

日志

 
 

linux卸载程序时,卸载相关的packages  

2011-08-04 09:42:12|  分类: linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
卸载httpd时报错,
error specifies multiple packages
解决方法,使用--allmatches选项(删除所以匹配包)
rpm -e --allmatches httpd-devel-2.2.3-45.el5.centos.1
如果出现error: Failed dependencies
解决方法,使用--nodeps选项(不查询依赖关系)
rpm -e --allmatches --nodeps httpd-2.2.3-45.el5.centos.1


另外,转一篇文章
1,现实情况往往是你想删除或卸载已安装好的软件。但你可能只知道这个软件安装好后的文件名是什么,此时可以先用which或其find找到你想删除的文件
[root@localhost rpm]# which httpd  ---查删除的文件
/usr/sbin/httpd
[root@localhost rpm]# rpm -q -f /usr/sbin/httpd  --根据文件查出所对应的rpm包名
httpd-2.2.3-31.el5.centos
[root@localhost rpm]# rpm -e httpd-2.2.3-31.el5.centos  --执行删除
error: Failed dependencies: --会报错,这说明会有依赖关系存在
        httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
        httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
        httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
        httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
        webserver is needed by (installed) webalizer-2.01_10-30.1.i386
        httpd is needed by (installed) piranha-0.8.4-13.el5.i386
        httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
        httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
        httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
        httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
        httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch
[root@localhost rpm]# rpm -e --allmatches httpd-2.2.3-31.el5.centos
error: Failed dependencies:
        httpd-mmn = 20051115 is needed by (installed) php-5.1.6-23.2.el5_3.i386
        httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.i386
        httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
        httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.i386
        webserver is needed by (installed) webalizer-2.01_10-30.1.i386
        httpd is needed by (installed) piranha-0.8.4-13.el5.i386
        httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.i386
        httpd = 0:2.2.3-31.el5.centos is needed by (installed) mod_ssl-2.2.3-31.el5.centos.i386
        httpd = 2.2.3-31.el5.centos is needed by (installed) httpd-manual-2.2.3-31.el5.centos.i386
        httpd >= 2.2.0 is needed by (installed) gnome-user-share-0.10-6.el5.i386
        httpd is needed by (installed) system-config-httpd-1.3.3.3-1.el5.noarch


-----加上删除一些选项,--allmatches是把与这个rpm包所有相匹配的rpm包全部删除掉;--nodeps是在删除时不进行依赖性的读取
[root@localhost rpm]# rpm -e --allmatches --nodeps httpd-2.2.3-31.el5.centos
[root@localhost rpm]# which httpd  ---再次查询,已经安装的rpm包已经没有了
  评论这张
 
阅读(328)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018