Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
763 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...