linux下rpm包强制安装

在linux下安装rpm包时经常会遇到下面这个问题:
例如:
[root@test Server]# rpm -ivh elfutils-libelf-devel-0.137-3.el5.i386.rpm
warning: elfutils-libelf-devel-0.137-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        elfutils-libelf-devel-static-i386 = 0.137-3.el5 is needed by elfutils-libelf-devel-0.137-3.el5.i386
遇到此问题时可以在安装rpm包命令的后面加两个参数,如
rpm -ivh elfutils-libelf-devel-0.137-3.el5.i386.rpm --nodeps --force
warning: elfutils-libelf-devel-0.137-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:elfutils-libelf-devel  ########################################### [100%]
 
就可以强制安装了。

你可能感兴趣的:(linux,职场,休闲,linux下rpm包强制安装)