如何解决A"版本`GLIBC_2.14'未找到"错误? [英] How do I fix a "version `GLIBC_2.14' not found" error?

查看:272
本文介绍了如何解决A"版本`GLIBC_2.14'未找到"错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Ubuntu 12.04下编译的C程序,建立了一个Debian软件包出来,并希望运行Debian Lenny的。

I've compiled a C program under Ubuntu 12.04, built a Debian package out of it, and want to install it on a server running Debian Lenny.

我最后一次这样做,(大约两个月前),它的工作:我可以安装包并运行二进制文件。但现在我得到以下错误信息:

Last time I did that (about two months ago) it worked: I could install the package and run the binary. But now I get the following error message:

(binary's name): /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by (binary's name))

除了我的机器升级到Ubuntu的12.4,我们带来了code的唯一显著的变化是的strdup()的调用,为此我必须启用 _POSIX_C_SOURCE = 200809L 功能测试宏。

Other than upgrading my machine to Ubuntu 12.4, the only significant change we've brought to the code is a call to strdup(), for which I had to enable the _POSIX_C_SOURCE=200809L feature test macro.

升级服务器到最新版本的Debian是不是我的preferred选择,因为它不是我的直接控制之下。

Upgrading the server to the latest Debian version is not my preferred option as it is not under my direct control.

我该如何解决这个问题?

How do I fix this problem?

推荐答案

我觉得这里的信息的关键位为升级我的机器。所以,当这个工作之前,你正在构建和东西比12.04更​​早包装?如果是这样,那么问题是,现在12.04附带的libc的新版本(显然2.14),而你现在二进制文件记录该版本的libc的依赖。当您尝试莱尼,这可能使用libc中的旧版本上运行,链接器检测到莱尼版本不支持的API 2.14,而失败。

I think the critical bit of info here is 'upgrading my machine'. So when this worked before, you were building and packaging on something earlier than 12.04? If so, then the issue is that 12.04 now ships with a newer version of libc (apparently 2.14), and your binary now records a dependency on that version of libc. When you try to run on Lenny, which likely uses an older version of libc, the linker detects that the Lenny version does not support the 2.14 API, and fails.

我认为最佳的方案可能是做你的开发和测试12.04,然后当你想创建一个特定的Debian发行版的软件包,使用的 pbuilder 或类似的创建德布斯。这将确保用于包装构建库目标平台相匹配。

I think the best way forward is probably to do your development and testing on 12.04, and then when you want to create packages for a specific Debian release, use pbuilder or similar to create debs. This will ensure that the libraries used for the packaging build match the target platform.

这篇关于如何解决A"版本`GLIBC_2.14'未找到"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆