【问题标题】:CentOS 64bit RPM with 32bit dependencies具有 32 位依赖项的 CentOS 64 位 RPM
【发布时间】:2013-05-15 18:12:59
【问题描述】:

我有一个帮助 rpm 包,用于安装必要的依赖项以使某些软件能够工作;问题是需要的依赖包是32位的,没有--setopt=protected_multilib=false标志就不能安装在CentOS 64位上。

要手动安装我刚刚运行的依赖项:

# yum install --setopt=protected_multilib=false libXrandr.i686

# yum install --setopt=protected_multilib=false gtk2.i686

# yum install --setopt=protected_multilib=false libXtst.i686

这将正确安装 32 位版本的软件包。

直接安装帮助程序包时出现问题,因为似乎无法强制 --setopt=protected_multilib=false 为依赖项。

尝试安装包时(本地,使用yum --nogpgcheck --setopt=protected_multilib=false localinstall centos_helper-0-0.x86_64.rpm)我收到以下错误:

Examining centos_helper-0-0.x86_64.rpm: centos_helper-0-0.x86_64
Marking centos_helper-0-0.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: mirror.dattobackup.com
 * extras: mirror.metrocast.net
 * rpmforge: mirror.de.leaseweb.net
 * updates: mirror.dattobackup.com
Resolving Dependencies
--> Running transaction check
---> Package centos_helper.x86_64 0:0-0 will be installed
--> Processing Dependency: libXrandr.i686 for package: centos_helper-0-0.x86_64
--> Processing Dependency: gtk2.i686 for package: centos_helper-0-0.x86_64
--> Processing Dependency: libXtst.i686 for package: centos_helper-0-0.x86_64
--> Finished Dependency Resolution
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
           Requires: gtk2.i686
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
           Requires: libXrandr.i686
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
           Requires: libXtst.i686
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

这与我在没有 protected_multilib=false 标志的情况下尝试手动安装依赖项时遇到的错误相同。

我用来创建包的 .spec 文件包含以下内容:

Summary: CentOS helper file
Name: centos_helper
Version: 0
Release: 0
License: Public
Group: Applications/System
Requires: libXrandr.i686,gtk2.i686,libXtst.i686
%description
Installer CentOS helper package
%files

有什么方法可以正确安装依赖项?

【问题讨论】:

    标签: linux 64-bit centos rpm rpmbuild


    【解决方案1】:

    你可能想看看http://www.rpm.org/wiki/PackagerDocs/ArchDependencies 我更喜欢自己引用 sonames,这样 yum 会查找要安装的依赖项。 我有重大的 CentOS 升级失败,因为如果这样。

    如果仅适用于最近的 RPM 版本:4.6 左右。如果你在旧的东西上:

    需要:real-soname.so.1()(64bit)、real-soname.so.1、包名

    根据记忆,您可能需要稍作调整。

    【讨论】:

    • 使用 so 是更优雅的解决方案,但我希望避免维护该列表,因为它很长;这就是我选择包裹的原因,因为有些包裹包含很多需要的东西。但我会做一个测试,将库标记为依赖项而不是包。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-24
    • 1970-01-01
    • 2020-01-09
    • 2016-11-08
    • 1970-01-01
    • 2013-11-07
    • 1970-01-01
    相关资源
    最近更新 更多