RHEL 6.5 RPM依赖关系 - 为什么我收到有关已安装RPM的依赖关系的错误?

时间:2015-01-20 17:05:35

标签: linux rpm

由于存在错误,我正在尝试从nscd-2.12-1.132.el6.x86_64升级到nscd-2.12-1.149.el6.x86_64。 glibc RPMs有几个依赖项。

以下是已经安装的glibc包:

[tim@host]~/nscd% rpm -qa | grep glibc
glibc-common-2.12-1.132.el6.x86_64
glibc-2.12-1.132.el6.i686
glibc-2.12-1.132.el6.x86_64
glibc-utils-2.12-1.132.el6.x86_64

以下是我尝试升级的RPM:

[tim@host]~/nscd% ll
total 35212
-rw-r----- 1 tim appeng   145372 Jan 16 21:04 gd-2.0.35-11.el6.x86_64.rpm
-rw-r----- 1 tim appeng  3993348 Jan 16 19:29 glibc-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r--r-- 1 tim appeng 14871492 Jan 17 01:14 glibc-common-2.12-1.149.el6_6.4.i686.rpm
-rw-r----- 1 tim appeng 14883600 Jan 16 19:31 glibc-common-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng  1006616 Jan 16 21:50 glibc-devel-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng   626024 Jan 16 21:48 glibc-headers-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng   170396 Jan 16 19:56 glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng    51912 Jan 16 21:13 libXpm-3.5.10-2.el6.x86_64.rpm
-rw-r----- 1 tim appeng   228352 Jan 16 19:57 nscd-2.12-1.149.el6_6.4.x86_64.rpm

以下是使用rpm尝试升级:

[tim@host]~/nscd% sudo rpm -Uvh *.rpm
[sudo] password for tim:
warning: gd-2.0.35-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        libcap.so.2 is needed by glibc-common-2.12-1.149.el6_6.4.i686
        glibc-common = 2.12-1.132.el6 is needed by (installed) glibc-2.12-1.132.el6.i686

更好地了解yum所发生的事情:

[tim@host]~/nscd% sudo yum localinstall *.rpm
[sudo] password for tim:
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Local Package Process
Examining gd-2.0.35-11.el6.x86_64.rpm: gd-2.0.35-11.el6.x86_64
gd-2.0.35-11.el6.x86_64.rpm: does not update installed package.
Examining glibc-2.12-1.149.el6_6.4.x86_64.rpm: glibc-2.12-1.149.el6_6.4.x86_64
Marking glibc-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-2.12-1.132.el6.x86_64
Marking glibc-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-2.12-1.132.el6.i686
Examining glibc-common-2.12-1.149.el6_6.4.i686.rpm: glibc-common-2.12-1.149.el6_6.4.i686
Marking glibc-common-2.12-1.149.el6_6.4.i686.rpm as an update to glibc-common-2.12-1.132.el6.x86_64
Examining glibc-common-2.12-1.149.el6_6.4.x86_64.rpm: glibc-common-2.12-1.149.el6_6.4.x86_64
Marking glibc-common-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-common-2.12-1.132.el6.x86_64
Examining glibc-devel-2.12-1.149.el6_6.4.x86_64.rpm: glibc-devel-2.12-1.149.el6_6.4.x86_64
Marking glibc-devel-2.12-1.149.el6_6.4.x86_64.rpm to be installed
Examining glibc-headers-2.12-1.149.el6_6.4.x86_64.rpm: glibc-headers-2.12-1.149.el6_6.4.x86_64
Marking glibc-headers-2.12-1.149.el6_6.4.x86_64.rpm to be installed
Examining glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm: glibc-utils-2.12-1.149.el6_6.4.x86_64
Marking glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-utils-2.12-1.132.el6.x86_64
Examining libXpm-3.5.10-2.el6.x86_64.rpm: libXpm-3.5.10-2.el6.x86_64
libXpm-3.5.10-2.el6.x86_64.rpm: does not update installed package.
Examining nscd-2.12-1.149.el6_6.4.x86_64.rpm: nscd-2.12-1.149.el6_6.4.x86_64
Marking nscd-2.12-1.149.el6_6.4.x86_64.rpm as an update to nscd-2.12-1.132.el6.x86_64
Resolving Dependencies
--> Running transaction check
---> Package glibc.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-common.x86_64 0:2.12-1.132.el6 will be updated
--> Processing Dependency: glibc-common = 2.12-1.132.el6 for package: glibc-2.12-1.132.el6.i686
---> Package glibc-common.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-devel.x86_64 0:2.12-1.149.el6_6.4 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.149.el6_6.4 will be installed
---> Package glibc-utils.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc-utils.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package nscd.x86_64 0:2.12-1.132.el6 will be updated
---> Package nscd.x86_64 0:2.12-1.149.el6_6.4 will be an update
--> Finished Dependency Resolution
Error: Package: glibc-2.12-1.132.el6.i686 (@anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5)
           Requires: glibc-common = 2.12-1.132.el6
           Removing: glibc-common-2.12-1.132.el6.x86_64 (@anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5)
               glibc-common = 2.12-1.132.el6
           Updated By: glibc-common-2.12-1.149.el6_6.4.x86_64 (/glibc-common-2.12-1.149.el6_6.4.x86_64)
               glibc-common = 2.12-1.149.el6_6.4
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

所以我要解决的是它不会升级nscd,因为已经安装了“glibc-common = 2.12-1.132.el6”的依赖失败。有人可以解释为什么我收到这条消息以及它实际意味着什么?

此外,如果有更好的方法可以不使用RHN订阅或Satellite(由于安全性,此环境和互联网之间没有连接)。

===========================================

更新: 我接受了Ethan的建议并添加了i686 glibc包。

更新了文件列表:

[tim@host]~/nscd% ll
total 38068
-rw-r----- 1 tim appeng   145372 Jan 16 21:04 gd-2.0.35-11.el6.x86_64.rpm
-rw-r--r-- 1 tim appeng  4553672 Jan 20 21:42 glibc-2.12-1.149.el6_6.4.i686.rpm
-rw-r----- 1 tim appeng  3993348 Jan 16 19:29 glibc-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r--r-- 1 tim appeng 14871492 Jan 17 01:14 glibc-common-2.12-1.149.el6_6.4.i686.rpm
-rw-r----- 1 tim appeng 14883600 Jan 16 19:31 glibc-common-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng   170396 Jan 16 19:56 glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm
-rw-r----- 1 tim appeng    51912 Jan 16 21:13 libXpm-3.5.10-2.el6.x86_64.rpm
-rw-r----- 1 tim appeng   228352 Jan 16 19:57 nscd-2.12-1.149.el6_6.4.x86_64.rpm

如果我尝试使用rpm进行更新,则无效。我如何确定需要下载的包含libcap.so.2的包?

[tim@host]~/nscd% sudo rpm -Uvh *.rpm
[sudo] password for tim:
warning: gd-2.0.35-11.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
error: Failed dependencies:
        libcap.so.2 is needed by glibc-common-2.12-1.149.el6_6.4.i686

奇怪的是,如果我使用yum它确实有效。为什么这样可行,但rpm不行?

[tim@host]~/nscd% sudo yum localinstall *.rpm
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Local Package Process
Examining gd-2.0.35-11.el6.x86_64.rpm: gd-2.0.35-11.el6.x86_64
gd-2.0.35-11.el6.x86_64.rpm: does not update installed package.
Examining glibc-2.12-1.149.el6_6.4.i686.rpm: glibc-2.12-1.149.el6_6.4.i686
Marking glibc-2.12-1.149.el6_6.4.i686.rpm as an update to glibc-2.12-1.132.el6.x86_64
rhel6                                                                                     | 3.9 kB     00:00
rhel6-alt                                                                                 | 3.9 kB     00:00
Marking glibc-2.12-1.149.el6_6.4.i686.rpm as an update to glibc-2.12-1.132.el6.i686
Examining glibc-2.12-1.149.el6_6.4.x86_64.rpm: glibc-2.12-1.149.el6_6.4.x86_64
Marking glibc-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-2.12-1.132.el6.x86_64
Marking glibc-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-2.12-1.132.el6.i686
Examining glibc-common-2.12-1.149.el6_6.4.i686.rpm: glibc-common-2.12-1.149.el6_6.4.i686
Marking glibc-common-2.12-1.149.el6_6.4.i686.rpm as an update to glibc-common-2.12-1.132.el6.x86_64
Examining glibc-common-2.12-1.149.el6_6.4.x86_64.rpm: glibc-common-2.12-1.149.el6_6.4.x86_64
Marking glibc-common-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-common-2.12-1.132.el6.x86_64
Examining glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm: glibc-utils-2.12-1.149.el6_6.4.x86_64
Marking glibc-utils-2.12-1.149.el6_6.4.x86_64.rpm as an update to glibc-utils-2.12-1.132.el6.x86_64
Examining libXpm-3.5.10-2.el6.x86_64.rpm: libXpm-3.5.10-2.el6.x86_64
libXpm-3.5.10-2.el6.x86_64.rpm: does not update installed package.
Examining nscd-2.12-1.149.el6_6.4.x86_64.rpm: nscd-2.12-1.149.el6_6.4.x86_64
Marking nscd-2.12-1.149.el6_6.4.x86_64.rpm as an update to nscd-2.12-1.132.el6.x86_64
Resolving Dependencies
--> Running transaction check
---> Package glibc.i686 0:2.12-1.132.el6 will be updated
---> Package glibc.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc.i686 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-common.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc-common.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-utils.x86_64 0:2.12-1.132.el6 will be updated
---> Package glibc-utils.x86_64 0:2.12-1.149.el6_6.4 will be an update
---> Package nscd.x86_64 0:2.12-1.132.el6 will be updated
---> Package nscd.x86_64 0:2.12-1.149.el6_6.4 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================
 Package            Arch         Version                     Repository                                     Size
=================================================================================================================
Updating:
 glibc              i686         2.12-1.149.el6_6.4          /glibc-2.12-1.149.el6_6.4.i686                 13 M
 glibc              x86_64       2.12-1.149.el6_6.4          /glibc-2.12-1.149.el6_6.4.x86_64               12 M
 glibc-common       x86_64       2.12-1.149.el6_6.4          /glibc-common-2.12-1.149.el6_6.4.x86_64       107 M
 glibc-utils        x86_64       2.12-1.149.el6_6.4          /glibc-utils-2.12-1.149.el6_6.4.x86_64         45 k
 nscd               x86_64       2.12-1.149.el6_6.4          /nscd-2.12-1.149.el6_6.4.x86_64               176 k

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

Total size: 133 M
Is this ok [y/N]: n
Exiting on user Command

1 个答案:

答案 0 :(得分:1)

您无法使用rpm执行更新,因为在安装路径上是glibc-common-2.12-1.149.el6_6.4.i686包。只允许使用一个glibc-common软件包。 看看你的yum输出。百胜仅更新x86_64 rpm。当然glibc.i686不存在。