Bill
Bill

Reputation: 5764

RPM Missing dependency

I am creating a RPM which has the following shared objects:

libexample.so --> libexample.so.1.0.1
libexample.so.1.0.1

When I am creating the RPM using rpmbuild, I see the rpm provides libexample.so.1.0.1. But, in the require section I see libexample.so

In the makefile of the project I refer libexample.so

When I am trying to install the rpm it gives an error "Missing dependency: libexample.so" even though it is packaged as a link file pointing to libexample.so.1.0.1

So the problem is somehow RPM is not considering that I am packaging libexample.so (which is a link to libexample.so.1.0.1)

However, I installed the rpm using --nodeps option and everything is working fine.

So, my question is how should I modify to avoid getting the error of missing dependency.

To validate that the missing dependency is due to the link file, I changed libexample.so from a link file to an actual shared object (cp libexample.so.1.0.1 libexample.so) and rpm does not giving the missing dependency error.

Can someone please help to tell me what I am missing and how to fix this missing dependency error in RPM. Thanks a lot in advance for your help and time.

Upvotes: 1

Views: 2962

Answers (2)

pwan
pwan

Reputation: 2914

Try running

rpm -q --requires _your_rpm_name_

And see if it's returning anything different from what you're expecting. I suspect the automatic dependency scripts may be setting the dependencies to something other than what you're expecting. You can disable to automatic dependencies by adding the tag below to your spec file, and then calling out your required packages manually:

AutoReqProv: no
Requires: _rpm_providing_libexample.so_

See http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html and http://ftp.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html

Upvotes: 1

Bob Stine
Bob Stine

Reputation: 947

I'm no expert, but I think that the problem is that RPM does not know about sonames. If the RPM file has a dependency, it checks the RPM system.

See my blog post.

Upvotes: 0

Related Questions