我有一个帮助 rpm 包,用于安装必要的依赖项以使某些软件工作;--setopt=protected_multilib=false
问题是所需的依赖包是32位的,没有标志就不能安装在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
有什么方法可以正确安装依赖项?