如何在 Gentoo 上安装 glibc 2.3.2?

发布于 2024-10-30 18:51:42 字数 288 浏览 0 评论 0原文

我写了一个应用程序,我需要在 Gentoo 上执行它, 但是当我尝试运行它时,我收到以下消息:

/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/local/myapp/lib/myapplib.so.1)

the current这个gentoo中的GLIBC版本是2.3.2。

我无法更新这个 glibc,因为我没有权限,所以我需要“降级” 我的 glibc 到相同版本(2.3.2)...我该怎么做?

谢了,

I'm wrote an application and I need to execute it on Gentoo,
but when I try run it, I get the following message:

/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/local/myapp/lib/myapplib.so.1)

the current GLIBC version in this gentoo is 2.3.2.

I can't update this glibc, because I don't have permission, so I need to 'downgrade'
my glibc to the same version (2.3.2) ... how can I do it?

tks,

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

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

发布评论

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

评论(2

审判长 2024-11-06 18:51:42

“/lib/libc.so.6:版本‘GLIBC_2.3.4’未找到”问题来自于尝试在具有旧版本 glibc 的系统上运行针对较新 glibc 编译的二进制文件。由于这个原因,强烈不鼓励降级 glibc。

既然您说您编写了该应用程序,那么在我看来,最简单的解决方案是在您计划运行该应用程序的系统上重新编译该应用程序。

The "/lib/libc.so.6: version `GLIBC_2.3.4' not found" problem comes from trying to run a binary compiled against a newer glibc on a system with an old version of glibc. Downgrading glibc is strongly discouraged for this reason.

Since you say you wrote the application, it seems to me that the simplest solution is to recompile the application on the system where you plan to run it.

情绪失控 2024-11-06 18:51:42

我实际上正在努力解决同样的问题,所以也许我有一些可以提供帮助的信息。

简而言之,您的二进制文件被编译以查找 libc.so.6。 GLIBC_2.3.4 位于 libc.so.5 中。据我所知,如果您在开发机器上降级 glibc,其他一些程序可能无法正常工作(因为它们是为了查找当前版本而编译的)。不知何故,CentOS/RHEL 有一个 compat-glibc 软件包,它可以与当前 glibc 一起存在而不会导致此错误。如果您的开发环境使用 CentOS/RHEL,请安装该软件包/重新编译,然后就可以开始了。您可能需要使用较旧的编译器来查找较旧的库。如果您不是在 CentOS/RHEL 上进行开发,请继续。

我今天的计划是从源代码编译 glibc。这意味着使用与旧版本 glibc 大约同时发布的编译器。您可能会遇到一些绊脚石(例如需要旧版本的 buildutils 等),但我希望一旦 libc.so.5 被编译并安装到 /usr/local/lib 中,我的应用程序就会发现在它之前在 /lib 中找到 libc.so.6。

就是这样。这不适合胆小的人,也绝对不是一个快速的解决方案。今天我计划对此进行测试,所以我不能说这是正确的解决方案。请,hivemind..如果我完全错了,请纠正我,并将这个可怜的灵魂从这条蜿蜒曲折的道路上拯救出来:-)

编辑:glibc 源链接

I'm actually wrestling with the same issue, so maybe I have some information that can help.

In short, your binary was compiled to look for libc.so.6. GLIBC_2.3.4 is in libc.so.5. As far as I know, if you downgrade your glibc on your dev machine some of your other programs may not work properly (because they were compiled to look for the current version). Somehow CentOS/RHEL have a compat-glibc package that can live along side of a current glibc without causing this error. If your dev box uses CentOS/RHEL, install that package/recompile and you should be good to go. You may need to use an older compiler for it to look for the older library. If you're not developing on CentOS/RHEL, continue on.

My plan of attack today is to compile glibc from source. This means using a compiler that was released around the same time as the older version of glibc. You may run into some stumbling blocks (such as needing an older version of buildutils, etc.), but my hope is once the libc.so.5 is compiled and installed into /usr/local/lib my application will find that before it finds libc.so.6 in /lib.

So there it is. It's not for the faint of heart, and it's definitely not a quick solution. Today I plan on testing this out, so I can't really say it's the right solution. Please, hivemind.. if I'm flat-out wrong correct me and save this poor soul from this winding torturous road :-)

EDIT: link to glibc sources

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