rpm 更新/升级 软件包

Posted OsSkill

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rpm 更新/升级 软件包相关的知识,希望对你有一定的参考价值。

 rpm参数解释

  -i  安装
  -h  解压rpm的时候打印50个斜条 (#)
  -v  显示详细信息

升级命令
rpm -Uvh rpm文件名

参数解释
  -U  升级
  -h  解压rpm的时候打印50个斜条 (#)
  -v  显示详细信息

 

  -q  在系统中查询软件或查询指定rpm包的内容信息
  -i  在系统中安装软件
  -U  在系统中升级软件
  -e  在系统中卸载软件
  -h  用#(hash)符显示rpm安装过程
  -v  详述安装过程
  -p  表明对RPM包进行查询,通常和其它参数同时使用,如:
  -qlp  查询某个RPM包中的所有文件列表
  -qip  查询某个RPM包的内容信息

 

例子:

  手动安装 libGL-devel

 

1、命令"yum install libGL-devel",显示信息,但是取消下载:

[[email protected] ~]# yum install libGL-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.opencas.cn
 * extras: mirrors.sina.cn
 * updates: mirrors.sina.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mesa-libGL-devel.i686 0:10.4.3-1.el6 will be installed
--> Processing Dependency: mesa-libGL = 10.4.3-1.el6 for package: mesa-libGL-devel-10.4.3-1.el6.i686
--> Processing Dependency: pkgconfig(libdrm) >= 2.4.38 for package: mesa-libGL-devel-10.4.3-1.el6.i686
--> Processing Dependency: pkgconfig(xxf86vm) for package: mesa-libGL-devel-10.4.3-1.el6.i686
--> Processing Dependency: pkgconfig(xdamage) for package: mesa-libGL-devel-10.4.3-1.el6.i686
--> Running transaction check
---> Package libXdamage-devel.i686 0:1.1.3-4.el6 will be installed
---> Package libXxf86vm-devel.i686 0:1.1.3-2.1.el6 will be installed
--> Processing Dependency: libXxf86vm = 1.1.3-2.1.el6 for package: libXxf86vm-devel-1.1.3-2.1.el6.i686
---> Package libdrm-devel.i686 0:2.4.59-2.el6 will be installed
--> Processing Dependency: libdrm = 2.4.59-2.el6 for package: libdrm-devel-2.4.59-2.el6.i686
---> Package mesa-libGL.i686 0:9.0-0.7.el6 will be updated
---> Package mesa-libGL.i686 0:10.4.3-1.el6 will be an update
--> Processing Dependency: mesa-dri-drivers(x86-32) = 10.4.3-1.el6 for package: mesa-libGL-10.4.3-1.el6.i686
--> Processing Dependency: libX11 > 1.6 for package: mesa-libGL-10.4.3-1.el6.i686
--> Running transaction check
---> Package libX11.i686 0:1.5.0-4.el6 will be updated
--> Processing Dependency: libX11 = 1.5.0-4.el6 for package: libX11-devel-1.5.0-4.el6.i686
---> Package libX11.i686 0:1.6.0-6.el6 will be an update
--> Processing Dependency: libX11-common = 1.6.0-6.el6 for package: libX11-1.6.0-6.el6.i686
---> Package libXxf86vm.i686 0:1.1.2-2.el6 will be updated
---> Package libXxf86vm.i686 0:1.1.3-2.1.el6 will be an update
---> Package libdrm.i686 0:2.4.39-1.el6 will be updated
---> Package libdrm.i686 0:2.4.59-2.el6 will be an update
---> Package mesa-dri-drivers.i686 0:9.0-0.7.el6 will be updated
---> Package mesa-dri-drivers.i686 0:10.4.3-1.el6 will be an update
--> Processing Dependency: libLLVM-3.4-mesa.so(libLLVM-3.4-mesa.so) for package: mesa-dri-drivers-10.4.3-1.el6.i686
--> Processing Dependency: libLLVM-3.4-mesa.so for package: mesa-dri-drivers-10.4.3-1.el6.i686
--> Running transaction check
---> Package libX11-common.noarch 0:1.5.0-4.el6 will be updated
---> Package libX11-common.noarch 0:1.6.0-6.el6 will be an update
---> Package libX11-devel.i686 0:1.5.0-4.el6 will be updated
---> Package libX11-devel.i686 0:1.6.0-6.el6 will be an update
---> Package mesa-private-llvm.i686 0:3.4-3.el6 will be installed
--> Processing Conflict: libX11-1.6.0-6.el6.i686 conflicts libxcb < 1.9.1-3
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package libxcb.i686 0:1.8.1-1.el6 will be updated
--> Processing Dependency: libxcb = 1.8.1-1.el6 for package: libxcb-devel-1.8.1-1.el6.i686
---> Package libxcb.i686 0:1.9.1-3.el6 will be an update
--> Running transaction check
---> Package libxcb-devel.i686 0:1.8.1-1.el6 will be updated
---> Package libxcb-devel.i686 0:1.9.1-3.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch          Version               Repository   Size
================================================================================
Installing:
 mesa-libGL-devel         i686          10.4.3-1.el6          base        495 k
Updating:
 libxcb                   i686          1.9.1-3.el6           base        115 k
Installing for dependencies:
 libXdamage-devel         i686          1.1.3-4.el6           base        9.3 k
 libXxf86vm-devel         i686          1.1.3-2.1.el6         base         18 k
 libdrm-devel             i686          2.4.59-2.el6          base         88 k
 mesa-private-llvm        i686          3.4-3.el6             base        5.9 M
Updating for dependencies:
 libX11                   i686          1.6.0-6.el6           base        593 k
 libX11-common            noarch        1.6.0-6.el6           base        192 k
 libX11-devel             i686          1.6.0-6.el6           base        983 k
 libXxf86vm               i686          1.1.3-2.1.el6         base         16 k
 libdrm                   i686          2.4.59-2.el6          base        127 k
 libxcb-devel             i686          1.9.1-3.el6           base        1.0 M
 mesa-dri-drivers         i686          10.4.3-1.el6          base         14 M
 mesa-libGL               i686          10.4.3-1.el6          base        164 k

Transaction Summary
================================================================================
Install       5 Package(s)
Upgrade       9 Package(s)

Total download size: 23 M
Is this ok [y/N]: 
Exiting on user Command
[[email protected] ~]# 

ZC:可以看到,需要安装的软件 确实是 mesa-libGL-devel,然后还有一些需要安装/升级的软件。

 

2、

在 http://pkgs.org/ 中搜索 相关的软件包进行安装

 

 

 

 

 

C

 

以上是关于rpm 更新/升级 软件包的主要内容,如果未能解决你的问题,请参考以下文章

Linux课堂随笔-第五天

RPM升级OPENSSH和OPENSSL

Linux 124课程 13安装和升级软件包

Linux中升级更新命令yum upgrade和yum update的区别

rpm命令,yum命令大全

软件安装