RPM 需要 i386 版本的软件包

发布于 2024-09-18 20:09:21 字数 585 浏览 3 评论 0原文

不太确定这是否属于这里...但是...

我成功地为 Centos 构建了一个 RPM,问题是它是一个 32 位二进制文​​件(不要问..) - rpm 规范的需要部分仅安装所需库的 64 位/x86_64 版本。

我正在链接 libicu,并且我希望 rpm 自动安装 32 位版本作为依赖项。我的需求在我的 rpmspec 文件中看起来像这样:

Requires: libicu

构建 rpm 工作正常,但当我尝试在完全干净的系统上安装 rpm 时,它 yum 希望将其安装为依赖项:

libicu    x86_64

这不起作用,因为这只是 x86_64 版本图书馆的。如果我尝试手动安装 libicu:

yum install libicu

我得到:

libicu    x86_64
libicu    i386

它也会安装该库的 32 位版本,并且我的应用程序可以运行。如何获取 rpm 自动安装该库的 32 位版本?任何想法将不胜感激...

Not really certain if this belongs here... but...

I am successfully building an RPM for Centos, the problem is that it is a 32bit binary (don't ask..) - the requires part of the rpm spec only installs the 64bit/x86_64 version of a required library.

I am linking against libicu, and I want the rpm to automatically install the 32bit version as dependency. My requires looks like this in my rpmspec file:

Requires: libicu

Building the rpm works fine, except when I try to install the rpm on a completely clean system it yum wants to install this as a dependency:

libicu    x86_64

Which does not work because that is only the x86_64 version of the library. If I try to install libicu manually:

yum install libicu

I get:

libicu    x86_64
libicu    i386

It installs the 32bit version of the library as well, and my application works. How can I get rpm to install the 32bit version of this library automatically? Any ideas would be appreciated...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

独守阴晴ぅ圆缺 2024-09-25 20:09:21

这个问题可能更好地属于 ServerFault,但我相信从 RPM 4.6.0 开始,您可以执行以下操作:

Requires: libicu%{_isa}
%if %{__isa_bits} == 64
Requires: libicu(%{__isa_name}-32)
%endif

[参见 http://www.rpm.org/wiki/PackagerDocs/ArchDependencies]

但是,不幸的是我的服务器我目前正在运行 RPM 4.4.2.3,所以我不得不使用你的解决方案......顺便说一句,谢谢你。 :-)

This question probably better belongs in ServerFault, but I believe that as of RPM 4.6.0, you can do something like this:

Requires: libicu%{_isa}
%if %{__isa_bits} == 64
Requires: libicu(%{__isa_name}-32)
%endif

[See http://www.rpm.org/wiki/PackagerDocs/ArchDependencies]

However, unfortunately the servers I'm currently working on are running RPM 4.4.2.3, so I've had to use your solution... and thanks for that, btw. :-)

橙味迷妹 2024-09-25 20:09:21

我(终于)找到了一个似乎有效的答案。将以下内容添加到 rpm 规范中的 Requires: 标记中:

actual-so-name()(64bit), actual-so-name-again, package-name

因此,作为示例,在我的情况下,我需要 libicu 我执行了以下操作(刚刚选择了我碰巧链接到的 icu .so 文件之一):

Requires: libicui18n.so.36()(64bit), libicuuc.so.36, libicu

这似乎去工作。

有更好的办法吗?

I (finally) found an answer that seems to work. Add the following to your Requires: tag in the rpm spec:

actual-so-name()(64bit), actual-so-name-again, package-name

So, in as an example, in my case I need libicu I did the following (just picked one of the icu .so files that I happen to link to):

Requires: libicui18n.so.36()(64bit), libicuuc.so.36, libicu

This seems to work.

Is there a better way?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文