Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
740 views
in Technique[技术] by (71.8m points)

yum - RPM package won't install dependency

I used rpmbuild to build an RPM package, however when I try to to install that RPM later on (with 'yum install' since it should take care of dependencies) I get the following error:

yum install package.rpm

Examining package.rpm: package
Error: Nothing to do

When I try to install it with 'rpm -i', I get this:

rpm -i package.rpm

error: Failed dependencies:
        libzip5 is needed by package

My question is -- how come 'yum install' won't install the dependency?

If I try to manually install that required package (with yum install libzip5), I have no issues, but I really need yum to install it automatically with 'package.rpm'.

question from:https://stackoverflow.com/questions/65917093/rpm-package-wont-install-dependency

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is expected if package is already present on your system. Even if it presented with a lower version.

On RHEL8+ you can use: dnf install --best which installs the latest version.

Or you can use yum upgrade which will explicitly ask for an upgrade and takes your package from the command line if it has a higher version.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...