rpm 更新/升级 软件包(libGL-devel手动安装过程)

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包的内容信息

  i 表示info,获得软件包的信息; 
  l 表示list,获得文件列表; 
  a 表示all,在所有包中执行查询; 
  f 表示file,根据文件进行相关的查询; 
  p 表示package,根据软件包进行查询

// *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

例子:

  手动安装 libGL-devel

1、

命令安装"yum install libGL-devel",显示信息:

[root@CentOS6 ~]# yum install libGL-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
base | 3.7 kB 00:00
base/primary_db | 3.6 MB 00:25
extras | 3.4 kB 00:00
extras/primary_db | 30 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.7 MB 00:42
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]: y
Downloading Packages:
(1/14): libX11-1.6.0-6.el6.i686.rpm | 593 kB 00:04
(2/14): libX11-common-1.6.0-6.el6.noarch.rpm | 192 kB 00:01
(3/14): libX11-devel-1.6.0-6.el6.i686.rpm | 983 kB 00:06
(4/14): libXdamage-devel-1.1.3-4.el6.i686.rpm | 9.3 kB 00:00
(5/14): libXxf86vm-1.1.3-2.1.el6.i686.rpm | 16 kB 00:00
(6/14): libXxf86vm-devel-1.1.3-2.1.el6.i686.rpm | 18 kB 00:00
(7/14): libdrm-2.4.59-2.el6.i686.rpm | 127 kB 00:01
(8/14): libdrm-devel-2.4.59-2.el6.i686.rpm | 88 kB 00:00
(9/14): libxcb-1.9.1-3.el6.i686.rpm | 115 kB 00:00
(10/14): libxcb-devel-1.9.1-3.el6.i686.rpm | 1.0 MB 00:07
(11/14): mesa-dri-drivers-10.4.3-1.el6.i686.rpm | 14 MB 01:38
(12/14): mesa-libGL-10.4.3-1.el6.i686.rpm | 164 kB 00:01
(13/14): mesa-libGL-devel-10.4.3-1.el6.i686.rpm | 495 kB 00:03
(14/14): mesa-private-llvm-3.4-3.el6.i686.rpm | 5.9 MB 00:41
--------------------------------------------------------------------------------
Total 138 kB/s | 23 MB 02:54
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>
Package: centos-release-6-4.el6.centos.10.i686 (@anaconda-CentOS-201303020136.i386/6.4)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libdrm-2.4.59-2.el6.i686 1/23
Updating : libxcb-1.9.1-3.el6.i686 2/23
Updating : libxcb-devel-1.9.1-3.el6.i686 3/23
Installing : libdrm-devel-2.4.59-2.el6.i686 4/23
Updating : libX11-common-1.6.0-6.el6.noarch 5/23
Updating : libX11-1.6.0-6.el6.i686 6/23
Updating : libX11-devel-1.6.0-6.el6.i686 7/23
Updating : libXxf86vm-1.1.3-2.1.el6.i686 8/23
Installing : libXxf86vm-devel-1.1.3-2.1.el6.i686 9/23
Installing : libXdamage-devel-1.1.3-4.el6.i686 10/23
Installing : mesa-private-llvm-3.4-3.el6.i686 11/23
Updating : mesa-dri-drivers-10.4.3-1.el6.i686 12/23
Updating : mesa-libGL-10.4.3-1.el6.i686 13/23
Installing : mesa-libGL-devel-10.4.3-1.el6.i686 14/23
Cleanup : mesa-libGL-9.0-0.7.el6.i686 15/23
Cleanup : libX11-devel-1.5.0-4.el6.i686 16/23
Cleanup : libxcb-devel-1.8.1-1.el6.i686 17/23
Cleanup : libXxf86vm-1.1.2-2.el6.i686 18/23
Cleanup : libX11-1.5.0-4.el6.i686 19/23
Cleanup : mesa-dri-drivers-9.0-0.7.el6.i686 20/23
Cleanup : libdrm-2.4.39-1.el6.i686 21/23
Cleanup : libX11-common-1.5.0-4.el6.noarch 22/23
Cleanup : libxcb-1.8.1-1.el6.i686 23/23
Verifying : libXxf86vm-1.1.3-2.1.el6.i686 1/23
Verifying : libxcb-1.9.1-3.el6.i686 2/23
Verifying : libXxf86vm-devel-1.1.3-2.1.el6.i686 3/23
Verifying : mesa-dri-drivers-10.4.3-1.el6.i686 4/23
Verifying : mesa-private-llvm-3.4-3.el6.i686 5/23
Verifying : libX11-1.6.0-6.el6.i686 6/23
Verifying : libXdamage-devel-1.1.3-4.el6.i686 7/23
Verifying : libX11-common-1.6.0-6.el6.noarch 8/23
Verifying : mesa-libGL-devel-10.4.3-1.el6.i686 9/23
Verifying : libX11-devel-1.6.0-6.el6.i686 10/23
Verifying : libxcb-devel-1.9.1-3.el6.i686 11/23
Verifying : mesa-libGL-10.4.3-1.el6.i686 12/23
Verifying : libdrm-devel-2.4.59-2.el6.i686 13/23
Verifying : libdrm-2.4.59-2.el6.i686 14/23
Verifying : mesa-dri-drivers-9.0-0.7.el6.i686 15/23
Verifying : libxcb-1.8.1-1.el6.i686 16/23
Verifying : libXxf86vm-1.1.2-2.el6.i686 17/23
Verifying : libdrm-2.4.39-1.el6.i686 18/23
Verifying : mesa-libGL-9.0-0.7.el6.i686 19/23
Verifying : libX11-devel-1.5.0-4.el6.i686 20/23
Verifying : libX11-common-1.5.0-4.el6.noarch 21/23
Verifying : libX11-1.5.0-4.el6.i686 22/23
Verifying : libxcb-devel-1.8.1-1.el6.i686 23/23 Installed:
mesa-libGL-devel.i686 0:10.4.3-1.el6 Dependency Installed:
libXdamage-devel.i686 0:1.1.3-4.el6 libXxf86vm-devel.i686 0:1.1.3-2.1.el6
libdrm-devel.i686 0:2.4.59-2.el6 mesa-private-llvm.i686 0:3.4-3.el6 Updated:
libxcb.i686 0:1.9.1-3.el6 Dependency Updated:
libX11.i686 0:1.6.0-6.el6 libX11-common.noarch 0:1.6.0-6.el6
libX11-devel.i686 0:1.6.0-6.el6 libXxf86vm.i686 0:1.1.3-2.1.el6
libdrm.i686 0:2.4.59-2.el6 libxcb-devel.i686 0:1.9.1-3.el6
mesa-dri-drivers.i686 0:10.4.3-1.el6 mesa-libGL.i686 0:10.4.3-1.el6 Complete!
[root@CentOS6 ~]#

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

ZC: 还有软件安装的顺序。

ZC:我在软件下载之后,保留了yum下载的相关软件(共14个,具体名字上面的过程中都有显示)。

ZC:在 yum安装 libGL-devel 的时候,在安装下载的软件之前,有一个 询问检索key 的过程,这个时候我正好用来复制yum下载的软件,然后yum安装完毕之后 会自动删掉下载的软件。我不知道是否所有的"yum install ???"在下载完毕之后都有一个询问的过程,如果没有的话,需要配置yum不自动删除下载的软件 以便我们复制下载的软件。

2、

手动安装 libGL-devel :

按照 yum的安装顺序来安装相关软件。遇到问题:

  (1)、"rpm -Uvh libdrm-2.4.59-2.el6.i686.rpm" ==> 这个软件,顺利安装,没有问题。

  (2)、"rpm -Uvh libxcb-1.9.1-3.el6.i686.rpm" ==> 这个安装的时候有错误信息,如下:

[root@CentOS6 packages]# rpm -qa|grep libdrm
libdrm-2.4.59-2.el6.i686 [root@CentOS6 packages]# rpm -Uvh libxcb-1.9.1-3.el6.i686.rpm
warning: libxcb-1.9.1-3.el6.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
libxcb = 1.8.1-1.el6 is needed by (installed) libxcb-devel-1.8.1-1.el6.i686 [root@CentOS6 packages]# rpm -qa|grep libxcb
libxcb-1.8.1-1.el6.i686
libxcb-devel-1.8.1-1.el6.i686 [root@CentOS6 packages]#

  ZC:上面信息可见:

    (A)、libdrm-2.4.59-2.el6.i686.rpm 安装成功

    (B)、原来系统中 libxcb 和 libxcb-devel 的版本 已经是 1.8.1-1 了。

    (C)、libxcb-1.9.1-3.el6.i686.rpm 安装报错,说 “libxcb-1.8.1-1.el6.i686.rpm(已安装) 被 libxcb-devel-1.8.1-1.el6.i686.rpm 需要”。思考:libxcb 和 libxcb-devel 的版本 已经是 1.8.1-1,应该不是哪个软件没装的原因了,难道是 ∵ libxcb-devel-1.8.1-1.el6.i686.rpm 正在使用 libxcb-1.8.1-1.el6.i686.rpm 而使得libxcb-1.8.1-1.el6.i686.rpm无法更新?(就像是一个进程独占一个文件的时候,其它进程无法操作该文件,一样的道理?)  于是就像尝试 libxcb-1.9.1-3.el6.i686.rpm 和 libxcb-devel-1.9.1-3.el6.i686.rpm 一起升级,于是有了尝试了这条语句"rpm -Uvh libxcb-1.9.1-3.el6.i686.rpm libxcb-devel-1.9.1-3.el6.i686.rpm",一试果然OK。

于是,上面的14个软件的安装语句变成下面这样(注意,这里的U是大写的):

  rpm -Uvh libdrm-2.4.59-2.el6.i686.rpm

  rpm -Uvh libxcb-1.9.1-3.el6.i686.rpm libxcb-devel-1.9.1-3.el6.i686.rpm

  rpm -Uvh libdrm-devel-2.4.59-2.el6.i686.rpm

  rpm -Uvh libX11-common-1.6.0-6.el6.noarch.rpm libX11-1.6.0-6.el6.i686.rpm libX11-devel-1.6.0-6.el6.i686.rpm

  rpm -Uvh libXxf86vm-1.1.3-2.1.el6.i686.rpm

  rpm -Uvh libXxf86vm-devel-1.1.3-2.1.el6.i686.rpm

  rpm -Uvh libXdamage-devel-1.1.3-4.el6.i686.rpm

  rpm -Uvh mesa-private-llvm-3.4-3.el6.i686.rpm

  rpm -Uvh mesa-dri-drivers-10.4.3-1.el6.i686.rpm mesa-libGL-10.4.3-1.el6.i686.rpm

  rpm -Uvh mesa-libGL-devel-10.4.3-1.el6.i686.rpm

这样,libGL-devel 顺利的手动安装好了:

[root@CentOS6 packages]# rpm -qa|grep libGL-devel
mesa-libGL-devel-10.4.3-1.el6.i686
[root@CentOS6 packages]#

ZC:感觉到 "rpm -Uvh ???" 不仅可以升级软件,还可以安装软件。

C

上一篇:Python学习-list操作


下一篇:.net开发环境搭建