转子:http://blog.sina.com.cn/s/blog_6151984a0100evli.html
rpm –ivh 安装rpm 包
rpm升级
rpm –Uvh sendmail-8.9.3-10.i386.rpm
rpm –qa | grep … 查当前安装的rpm包
rpm -q telnet-server
卸载RPM软件包------rpm -e
最基本的卸载例子
# rpm -qa | grep php 卸前先查
php-ldap-5.0.4-10
php-5.0.4-10
php-pear-5.0.4-10
# rpm -e php-pear-5.0.4-10 php-5.0.4-10 php-ldap-5.0.4-10
可以一次卸载多个
# rpm -qa | grep php
卸载中常见的依赖错误
# rpm -qa | grep httpd
system-config-httpd-1.3.2-2
httpd-2.0.54-10
# rpm -e httpd-2.0.54-10
error: Failed dependencies:
httpd-mmn = 20020903 is needed by (installed) mod_perl-2.0.0-0.rc5.3.i386
httpd-mmn = 20020903 is needed by (installed) mod_python-3.1.4-2.i386
httpd-mmn = 20020903 is needed by (installed) mod_ssl-2.0.54-10.i386
webserver is needed by (installed) webalizer-2.01_10-28.i386
httpd >= 2.0.40 is needed by (installed) mod_perl-2.0.0-0.rc5.3.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.1.4-2.i386
httpd = 2.0.54-10 is needed by (installed) mod_ssl-2.0.54-10.i386
httpd is needed by (installed) system-config-httpd-1.3.2-2.noarch
卸不掉,很多软件依赖它,只能把依赖软件先卸掉
# rpm -e system-config-httpd-1.3.2-2
# rpm -qa | grep mod_perl
mod_perl-2.0.0-0.rc5.3
# rpm -qa | grep mod_python
mod_python-3.1.4-2
# rpm -qa | grep mod_ssl
mod_ssl-2.0.54-10
# rpm -e mod_perl-2.0.0-0.rc5.3
# rpm -e mod_python-3.1.4-2
# rpm -e mod_ssl-2.0.54-10
# rpm -e httpd-2.0.54-10
error: Failed dependencies:
webserver is needed by (installed) webalizer-2.01_10-28.i386
# rpm -qa | grep webalizer
webalizer-2.01_10-28
# rpm -e webalizer-2.01_10-28
# rpm -e httpd-2.0.54-10
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave
rpm --nodeps (不检查依赖性)
因为linux的一些bug,有些软件是相互依赖的,先装/卸哪个都不行,就得用nodeps这个参数才行。
下边的“死循环”,你需要我,我需要你
# rpm -ivh httpd-suexec-2.0.52-25.ent.i386.rpm
warning: httpd-suexec-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
httpd = 2.0.52-25.ent is needed by httpd-suexec-2.0.52-25.ent.i386
Suggested resolutions:
httpd-2.0.52-25.ent.i386.rpm
# rpm -ivh httpd-2.0.52-25.ent.i386.rpm
warning: httpd-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
httpd-suexec is needed by httpd-2.0.52-25.ent.i386
Suggested resolutions:
httpd-suexec-2.0.52-25.ent.i386.rpm
解决:一个--nodeps不依赖,一个正常的依赖
# rpm -ivh --nodeps httpd-2.0.52-25.ent.i386.rpm
warning: httpd-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:httpd ########################################### [100%]
# rpm -ivh httpd-suexec-2.0.52-25.ent.i386.rpm
warning: httpd-suexec-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:httpd-suexec ########################################### [100%]
rpm –ivh 安装rpm 包
rpm升级
rpm –Uvh sendmail-8.9.3-10.i386.rpm
rpm –qa | grep … 查当前安装的rpm包
rpm -q telnet-server
卸载RPM软件包------rpm -e
最基本的卸载例子
# rpm -qa | grep php 卸前先查
php-ldap-5.0.4-10
php-5.0.4-10
php-pear-5.0.4-10
# rpm -e php-pear-5.0.4-10 php-5.0.4-10 php-ldap-5.0.4-10
可以一次卸载多个
# rpm -qa | grep php
卸载中常见的依赖错误
# rpm -qa | grep httpd
system-config-httpd-1.3.2-2
httpd-2.0.54-10
# rpm -e httpd-2.0.54-10
error: Failed dependencies:
httpd-mmn = 20020903 is needed by (installed) mod_perl-2.0.0-0.rc5.3.i386
httpd-mmn = 20020903 is needed by (installed) mod_python-3.1.4-2.i386
httpd-mmn = 20020903 is needed by (installed) mod_ssl-2.0.54-10.i386
webserver is needed by (installed) webalizer-2.01_10-28.i386
httpd >= 2.0.40 is needed by (installed) mod_perl-2.0.0-0.rc5.3.i386
httpd >= 2.0.40 is needed by (installed) mod_python-3.1.4-2.i386
httpd = 2.0.54-10 is needed by (installed) mod_ssl-2.0.54-10.i386
httpd is needed by (installed) system-config-httpd-1.3.2-2.noarch
卸不掉,很多软件依赖它,只能把依赖软件先卸掉
# rpm -e system-config-httpd-1.3.2-2
# rpm -qa | grep mod_perl
mod_perl-2.0.0-0.rc5.3
# rpm -qa | grep mod_python
mod_python-3.1.4-2
# rpm -qa | grep mod_ssl
mod_ssl-2.0.54-10
# rpm -e mod_perl-2.0.0-0.rc5.3
# rpm -e mod_python-3.1.4-2
# rpm -e mod_ssl-2.0.54-10
# rpm -e httpd-2.0.54-10
error: Failed dependencies:
webserver is needed by (installed) webalizer-2.01_10-28.i386
# rpm -qa | grep webalizer
webalizer-2.01_10-28
# rpm -e webalizer-2.01_10-28
# rpm -e httpd-2.0.54-10
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave
rpm --nodeps (不检查依赖性)
因为linux的一些bug,有些软件是相互依赖的,先装/卸哪个都不行,就得用nodeps这个参数才行。
下边的“死循环”,你需要我,我需要你
# rpm -ivh httpd-suexec-2.0.52-25.ent.i386.rpm
warning: httpd-suexec-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
httpd = 2.0.52-25.ent is needed by httpd-suexec-2.0.52-25.ent.i386
Suggested resolutions:
httpd-2.0.52-25.ent.i386.rpm
# rpm -ivh httpd-2.0.52-25.ent.i386.rpm
warning: httpd-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
httpd-suexec is needed by httpd-2.0.52-25.ent.i386
Suggested resolutions:
httpd-suexec-2.0.52-25.ent.i386.rpm
解决:一个--nodeps不依赖,一个正常的依赖
# rpm -ivh --nodeps httpd-2.0.52-25.ent.i386.rpm
warning: httpd-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:httpd ########################################### [100%]
# rpm -ivh httpd-suexec-2.0.52-25.ent.i386.rpm
warning: httpd-suexec-2.0.52-25.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:httpd-suexec ########################################### [100%]