如何制作一个基于 arch 将库安装到 /usr/lib xor /usr/lib64 的 rpm 规范?

发布于 2024-09-07 02:49:25 字数 86 浏览 0 评论 0原文

我正在为 centos 制定 RPM 规范,如果 arch 是 64 位,则需要将共享库安装到 /usr/lib64 ,否则需要安装到 /usr/lib 吗?

I'm working on an RPM spec for centos and it needs to install the shared libraries to /usr/lib64 if the arch is 64 bit and /usr/lib otherwise?

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

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

发布评论

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

评论(3

榆西 2024-09-14 02:49:59

对于 Redhat(和 CentOS)6,RPM 宏似乎已经注入了 —libdir=/usr/lib64。

这就是 RH/CentOS 6 通过 RPM SPEC 文件设置 lib64 的方式。

在 RH/CentOS 6 上,执行 automake/configure 不会(并且根据 RH,不会)在 x86_64 架构类型的情况下将库前缀添加到 /usr/lib64。

所有这些都已在 RH/CentOS 7 及更高版本中得到修复。

It would appear that for Redhat (and CentOS) 6, the RPM macro already injects the —libdir=/usr/lib64.

This is how RH/CentOS 6 sets the lib64 which is through RPM SPEC file.

On RH/CentOS 6, doing automake/configure does not (and according to RH, will not) do the library prefix to /usr/lib64 in case of x86_64 arch type.

All this has been fixed for RH/CentOS 7 and higher.

掀纱窥君容 2024-09-14 02:49:53

库的安装路径将由您创建的包的类型决定。

The path a library is installed into would be determined by the type of package you are creating.

回心转意 2024-09-14 02:49:42

这不是它应该如何工作的。决定库位置的不是内核类型,而是库类型本身 - 64 位 .so 位于 /usr/lib64,32 位 .so 位于 /usr/lib。

你不能让一个 RPM 包含两种架构,结果应该是 2 个不同的 RPM,如果我没记错的话,如果你使用 %_libdir,RPM 宏应该会为你解决这个问题。

That's not how it's supposed to work. It's not the kernel type that should determine where your libraries go, but the library types themselves - 64-bit .so's go to /usr/lib64, 32-bit to /usr/lib.

You can't have one RPM contain both architectures, the result should be 2 different RPMs, and if I am not mistaken RPM macros should resolve this for you if you use %_libdir.

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