2013-05-15 72 views
1

我有一個幫助程序rpm包,用於安裝必要的依賴項以使某些軟件能夠正常工作;問題是所需的依賴包是32位的,不能在沒有--setopt=protected_multilib=false標誌的情況下安裝在CentOS 64位上。與32位依賴關係的CentOS 64位RPM

要手動安裝我剛剛運行的依賴關係:

# 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當我得到=假標誌。

我使用創建包代表.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 

任何方式都依賴安裝是否正確?

回答

0

你可能想看看http://www.rpm.org/wiki/PackagerDocs/ArchDependencies 我更喜歡自己引用sonames,這樣yum會查找依賴性安裝。 我有主要的CentOS升級失敗,因爲如果這。

如果僅適用於最新的RPM版本:4.6左右。如果你對舊的東西:

要求:真實soname.so.1()(64位),實時soname.so.1,軟件包名

從內存中,你可能需要一個調整。

+0

使用so是更優雅的解決方案,但我希望避免必須維護該列表,因爲它很長;這就是爲什麼我帶着包去的原因,因爲有些包包含很多需要的東西。 但我會做一個測試標記庫作爲依賴而不是包。 –