1

我正在创建一个具有以下共享对象的 RPM:

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

当我使用 RPM 创建 RPM 时rpmbuild,我看到 rpm 提供了libexample.so.1.0.1. 但是,在我看到的要求部分libexample.so

makefile我提到的项目中libexample.so

当我尝试安装 rpm 时,它会出现错误"Missing dependency: libexample.so",即使它被打包为指向的链接文件libexample.so.1.0.1

所以问题是不知何故 RPM 没有考虑到我正在打包libexample.so(这是一个链接libexample.so.1.0.1

但是,我使用选项安装了 rpm --nodeps,一切正常。

所以,我的问题是我应该如何修改以避免出现缺少依赖项的错误。

为了验证缺少的依赖项是由链接文件引起的,我 libexample.so从链接文件更改为实际的共享对象 ( cp libexample.so.1.0.1 libexample.so),并且 rpm 没有给出缺少依赖项的错误。

有人可以帮助告诉我我缺少什么以及如何修复 RPM 中缺少的依赖项错误。非常感谢您的帮助和时间。

4

2 回答 2

1

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

于 2012-10-20T17:50:09.007 回答
0

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.

于 2016-05-01T11:43:39.537 回答