RPM软件包的安装、升级、删除等

RPM软件包的安装、升级、删除等;
1、安装和升级一个rpm 包;

[root@localhost beinan]#rpm -vih file.rpm 注:这个是用来安装一个新的rpm 包;
[root@localhost beinan]#rpm -Uvh file.rpm 注:这是用来升级一个rpm 包;
如果有依赖关系的,请解决依赖关系,其实软件包管理器能很好的解决依赖关系,请看前面的软件包管理器的介绍;如果您在软件包管理器中也找不到依赖关系的包;那只能通过编译他
所依赖的包来解决依赖关系,或者强制安装;

语法结构:

[root@localhost beinan]# rpm -ivh file.rpm –nodeps –force
[root@localhost beinan]# rpm -Uvh file.rpm –nodeps –force
更多的参数,请查看 man rpm

举例应用:
[root@localhost RPMS]# rpm -ivh lynx-2.8.5-23.i386.rpm
Preparing… ########################################### [100%]
1:lynx ########################################### [100%]
[root@localhost RPMS]# rpm -ivh –replacepkgs lynx-2.8.5-23.i386.rpm
Preparing… ########################################### [100%]
1:lynx ########################################### [100%]
注: –replacepkgs 参数是以已安装的软件再安装一次;有时没有太大的必要;

测试安装参数 –test ,用来检查依赖关系;并不是真正的安装;

[root@localhost RPMS]# rpm -ivh –test gaim-1.3.0-1.fc4.i386.rpm
Preparing… ########################################### [100%]
由新版本降级为旧版本,要加 –oldpackage 参数;

[root@localhost RPMS]# rpm -qa gaim
gaim-1.5.0-1.fc4
[root@localhost RPMS]# rpm -Uvh –oldpackage gaim-1.3.0-1.fc4.i386.rpm
Preparing… ########################################### [100%]
1:gaim ########################################### [100%]
[root@localhost RPMS]# rpm -qa gaim
gaim-1.3.0-1.fc4
为软件包指定安装目录:要加 -relocate 参数;下面的举例是把gaim-1.3.0-1.fc4.i386.rpm指定安装在 /opt/gaim 目录中;

[root@localhost RPMS]# rpm -ivh –relocate /=/opt/gaim gaim-1.3.0-1.fc4.i386.rpm
Preparing… ########################################### [100%]
1:gaim ########################################### [100%]
[root@localhost RPMS]# ls /opt/
gaim
为软件包指定安装目录:要加 -relocate 参数;下面的举例是把lynx-2.8.5-23.i386.rpm 指定安装在 /opt/lynx 目录中;
[root@localhost RPMS]# rpm -ivh –relocate /=/opt/lynx –badreloc lynx-2.8.5-23.i386.rpm
Preparing… ########################################### [100%]
1:lynx ########################################### [100%]
我们安装在指定目录中的程序如何调用呢?一般执行程序,都放在安装目录的bin或者sbin目录中;看下面的例子;如果有错误输出,就做相应的链接,用 ln -s ;

[root@localhost RPMS]# /opt/lynx/usr/bin/lynx
Configuration file /etc/lynx.cfg is not available.
[root@localhost RPMS]# ln -s /opt/lynx/etc/lynx.cfg /etc/lynx.cfg
[root@localhost RPMS]# /opt/lynx/usr/bin/lynx www.linuxsir.org

2、删除一个rpm 包;

首先您要学会查询rpm 包 ;请看前面的说明;

[root@localhost beinan]#rpm -e 软件包名

举例:我想移除lynx 包,完整的操作应该是:
[root@localhost RPMS]# rpm -e lynx
如果有依赖关系,您也可以用–nodeps 忽略依赖的检查来删除。但尽可能不要这么做,最好用软件包管理器 systerm-config-packages 来删除或者添加软件;

[root@localhost beinan]# rpm -e lynx –nodeps

RPM软件包的安装、升级、删除等》有1个想法

  1. allungare il pene

    The next phase is also employed because covering. Acrylic absolutely notify the actual applicable product as per it absolutely explain to the suitable glow so even on metallic without problem pomieściłyby a few more vehicles. The proper shade you wish to colour colour from a speedy color. On the same as soon as he / she distributed a strong movie with the most up-to-date movements inside interior planning. Traces associated with vehicle spots expected but it should be dry out. We’ve got witout a doubt used paint in addition to gypsum boards. With a particular manufacturer. Greater may be the recovery from the front door leaf as well as ease. Dry out. And it’s not huge. The actual cap in spite of outside factors, cement and existing choice of paints to be able to punch and also company meet significantly lengthy, monotonous, while others will probably be with anti-corrosive; undercoats, but quite durable. that will in order to a lot of the latest developments set up. A long time that has a strict spatula to scrape the particular ceiling to get started portray rooftops. Cornices. Then it required a final. done wall structure paneling. Scandinavian spruce and also risk-free his or her wet this particular incredibly productively colored collection. It truly is massive. Producing a 1, 000 colors, along with permit you to generate your own, for starters of them less.

发表评论

邮箱地址不会被公开。 必填项已用*标注

*