Linux下rpm包相互依賴的解決辦法

snowdba發表於2014-07-16

今天用最原始的方法安裝oracle依賴的rpm包。
對應oracle官網文件上面的要求,一次檢查安裝包是否存在。
Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106 
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2 
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
Oracle Linux 6 and Red Hat Enterprise Linux 6 The following packages (or later versions) must be installed:
binutils-2.20.51.0.2-5.11.el6.i686
compat-libcap1-1.10-1.i686
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6.i686
gcc-c++-4.4.4-13.el6.i686
glibc-2.12-1.7.el6.i686
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6.i686
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6.i686
sysstat-9.0.4-11.el6.i686

mount光碟後,進入到Server目錄,透過rpm -qa | grep xxxx命令能找到要安裝的rpm包。

在安裝rpm -ivh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm  提示依賴 “elfutils-libelf-devel-static-x86
按照提示要求,安裝rpm -ivh elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm  又提示依賴剛剛執行但是無法透過的“elfutils-libelf-devel-x86_64
現在的局面是A依賴B,B又依賴A,死迴圈!

[root@localhost Server]# rpm -ivh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm
warning: elfutils-libelf-devel-0.137-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
        elfutils-libelf-devel-static-x86_64 = 0.137-3.el5 is needed by elfutils-libelf-devel-0.137-3.el5.x86_64

[root@localhost Server]# rpm -ivh elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm
warning: elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
error: Failed dependencies:
        elfutils-libelf-devel-x86_64 = 0.137-3.el5 is needed by elfutils-libelf-devel-static-0.137-3.el5.x86_64


其實解決的方法也很簡單,就是把它們放在一起執行,用空格分開就可以了。
[root@localhost Server]# rpm -ivh elfutils-libelf-devel-0.137-3.el5.x86_64.rpm elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm
warning: elfutils-libelf-devel-0.137-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing...                ########################################### [100%]
   1:elfutils-libelf-devel-s########################################### [ 50%]
   2:elfutils-libelf-devel  ########################################### [100%]

安裝順利透過!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1220760/,如需轉載,請註明出處,否則將追究法律責任。

相關文章