Problem
I want to offline install some rpms for an application, I put all dependencies for that application in a dedicated directory. The problem is it will cause conflicts with the old installed ones, I also want to keep old existing rpms because they may needed by other packages. For example, I offline install bind-utils
use command:
1 | yum --disablerepo=* install -y ./bind-utils/*.rpm |
Error output:
1 | ... |
This error shows that yum
try to update old rpm with new one but this breaks the dependency chain. Option --skip-broken
won’t work here, it will skip the dependency-problem rpm which include exactly what I need:
1 | # skipped |
Then I try to use:
1 | rpm -ivh ./bind-utils/*.rpm |
still bad with conflicts:
1 | ... |
Solution
After doing research I find some rpm
options may help:
1 | rpm {-i|--install} [install-options] PACKAGE_FILE ... |
Let’s add --force
flag and try again, this works and the old rpms are still there:
1 | rpm --force -ivh ./bind-utils/*.rpm |
1 | rpm -qa | grep openssl-libs |