RPM 规范文件构建阶段期间出现 RPM 依赖性错误
我的目的是通过 RPM 将已构建的 libmy.so
分发为可安装库。
以下是 .spec 文件的片段:
%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
在编译 libmy.so
时,我将其链接到作为另一个 RPM 的一部分安装的 libxx.so
。
在安装作为上述步骤 1 的一部分创建的 RPM 时,即使计算机上安装了 libxx.so
,它也会出现以下依赖项错误
$ rpm -ivh *rpm
error: Failed dependencies:
libxx.so()(64bit) is needed by *rpm
我们已尝试了以下操作。
在分析过程中我们发现ld.so.conf
中不存在libxx.so
所在的路径。但是,添加 libxx.so 所在路径的条目对我们没有帮助。
请告知我们是否需要执行任何其他步骤来消除此依赖性错误。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装时,
rpm
会在 RPM 数据库中查找条目;它不会测试系统上的文件或可链接的文件。That的输出是什么,
将列出哪个包提供 libXX.so。如果没有包提供它,您的 RPM 将出现依赖错误。从
Requires:
条目中删除 libXX.so。如果您没有手动指定它,它可能会被自动检测到。在您的规范文件中,您可以设置:这将禁用
Requires:
的所有自动检测。http://ftp.rpm.org/max- rpm/s1-rpm-depend-auto-depend.html
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
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:That will disable ALL automatic detection of
Requires:
.http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html