64位rpm无法解决32位依赖关系

64位rpm无法解决32位依赖关系

问题

我有一个包含混合 64 位和 32 位二进制文​​件的 RPM。其中一个二进制文件依赖于 32 位 i686 软件包。当我尝试安装该软件包时,yum 给出了一个错误,指出该软件包需要 32 位软件包。然而,当我尝试自己安装所需的软件包时,它工作得完美无缺。

细节

在我的规范文件中我有

Requires:       glibc.i686 libstdc++.i686 device-mapper-libs.i686 lshw

当我尝试在 CentOS 6.3 系统上安装该软件包时,我得到:

# yum update gamigo-kvm-tools
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package gamigo-kvm-tools.x86_64 0:0.0.7-4 will be updated
---> Package gamigo-kvm-tools.x86_64 0:0.0.9-4 will be an update
--> Processing Dependency: libstdc++.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Processing Dependency: glibc.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Processing Dependency: device-mapper-libs.i686 for package: gamigo-kvm-tools-0.0.9-4.x86_64
--> Finished Dependency Resolution
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: libstdc++.i686
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: device-mapper-libs.i686
Error: Package: gamigo-kvm-tools-0.0.9-4.x86_64 (gamigo-CentOS-6-x86_64-liv)
           Requires: glibc.i686
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

但是,当我手动安装引用的包时,我得到

# yum install libstdc++.i686 device-mapper-libs.i686 glibc.i686
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Package libstdc++-4.4.6-4.el6.i686 already installed and latest version
Package device-mapper-libs-1.02.74-10.el6.i686 already installed and latest version
Package glibc-2.12-1.80.el6_3.5.i686 already installed and latest version
Nothing to do

我不太明白为什么会发生错误以及它想告诉我什么。我发现它只发生在 32 位软件包中,因为第四个必需的软件包“lshw”似乎没有问题。是否有特殊的specfile语法来引用32位包?

答案1

我刚刚找到了答案。我的 Requires 行应该是

Requires:       glibc(x86-32) libstdc++(x86-32) device-mapper-libs(x86-32)

如中所述 http://www.rpm.org/wiki/PackagerDocs/ArchDependency

答案2

由于有人回答了 4.6 的回答 - 对于 4.4 版本,如果您依赖 32 位 RPM 来解决困难或缺乏可能对其他人有用的语法:

Requires:      /lib/libc.so.6

由于该文件是由 32 位 glibc 提供的,因此安装将引入正确的依赖项。

相关内容