Why does rpm built not able to find the library from the system?

Solution Verified - Updated -


  • Create a package foo v1 containing a shared library (/usr/local/lib/libfoo.so) which does not set the soname
  • Create a package bar using this shared library
# rpm -qRp bar.rpm | grep foo
  • Create a new version of package foo v2 where the shared library now sets the soname and is installed as a symbolic link from /usr/local/lib/libfoo.so to /usr/local/lib/libfoo.so.1
  • The bar program built against the original verson of libfoo can find it regardless of whether the old or new version is installed.
  • However, installation of bar when foo v2 is installed fails dependency checking.
error: Failed dependencies:
        libfoo.so is needed by bar
  • Likewise an upgrade from foo v1 to foo v2 will fail for the same reason.
  • One needs to recompile (relink) bar against libfoo.so.1.
  • Shall rpm should not understand that libfoo.so is inclusive of libfoo.so.1 when checking dependencies.
  • That is, the behavior of rpm should match the behavior of the OS.


  • Red Hat Enterprise Linux 7
  • rpm-build

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In