My purpose is to distribute an already build libmy.so
as installable library through RPM.
Following is the snippet of the .spec file:
%define elX el5
%define arch x86_64
Name: my_rpm
Version: 1.0
Requires: <package name which installs libxx.so >
%prep
%define debug_package %{nil}
%build
%install
%files
%defattr(-, root, root)
/home/%{elX}/%{arch}/%{name}_%{version}/lib/libmy.so
At the time of compilation of libmy.so
, I am linking it against libxx.so
which is installed as part of another RPM.
While installing the RPM created as a part of above step 1, it gives following dependency error even if libxx.so
is installed on the machine
$ rpm -ivh *rpm
error: Failed dependencies:
libxx.so()(64bit) is needed by *rpm
We have tried the following things.
During the analysis we observed that the path where libxx.so
is located is not present in ld.so.conf
. However, adding an entry of path where libxx.so
is located did not help us.
Please let us know whether we need to perform any additional steps to remove this dependency error.
When you install, rpm
is looking for an entry in the RPM database; it does not test for the file on the system or linkable.
What is the output of
$ rpm -q --whatprovides libXX.so
That will list which package provides libXX.so. If no package provides it, your RPM will have a dependency error. Remove libXX.so from the Requires:
entry. If you're not manually specifying it, it may be detected automatically. In your spec file, you can set:
AutoReqProv: no
That will disable ALL automatic detection of Requires:
.