We build an RPM package that automatically detect dependencies (no Requires in .spec file). How can I remove dependencies from this RPM package.

Long story:-> I'm shipping the dynamic libraries along with the binary but RPMs automatic dependencies mechanism obviously lists that shipped libraries also as dependencies. How to avoid this?

2 Answers 2


I you don't want rpm to process these dependencies automatically; you can use:

AutoReqProv: no

However, I have multiple time packaged myself binaries and the libraries they depend on; rpm has never caused me any trouble in that way; maybe your way of packaging is not optimal?

For further reading on the automatic dependencies: http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html

  • Ok let me ask you this, after you package the said libraries and create RPM; does rpm -qp --requires <yourPackage> shows the packaged libraries listed there? If yes, then thats what I'm trying to avoid.
    – PnotNP
    Mar 13, 2018 at 0:40

These dependencies that are listed in rpm -qp -requires <pkg>.rpm are virtual packages if automatic dependencies is specified in <pkg>.spec file. These virtual packages are NOT library soname but rather just virtual package names (even though they look like soname).

e.g. on Fedora 27, this works

$ rpm -q --whatprovides "libQt5Core.so.5()(64bit)"        

but this doesn't

$ rpm -q --whatprovides libQt5Core.so.5
no package provides libQt5Core.so.5
$ rpm -q --whatprovides libQt5Core
no package provides libQt5Core
$ rpm -q --whatprovides Qt5Core
no package provides Qt5Core

If your own <pkg>.rpm itself bundles the libraries (i.e. provides these virtual packages) then RPM will not complain if these virtual packages are not installed on the system since they are supplied with your package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.