gcc:减少libc所需的版本 [英] gcc: Reduce libc required version

查看:107
本文介绍了gcc:减少libc所需的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在一些较旧的32位RedHat发行版上运行新编译的二进制文件.
二进制文件是在运行libc v2.12的CentOS 32位VM上编译的(不是++).

RedHat抱怨libc版本:

I am trying to run a newly compiled binary on some oldish 32bits RedHat distribution.
The binary is compiled C (not++) on a CentOS 32bits VM running libc v2.12.

RedHat complains about libc version:

error while loading shared libraries: requires glibc 2.5 or later dynamic linker

由于我的程序非常简单,因此很可能没有使用libc中的新功能.

有没有办法降低libc版本要求

Since my program is rather simplistic, It is most likely not using anything new from libc.

Is there a way to reduce libc version requirement

推荐答案

好吧,然后,尝试在优雅和蛮力之间找到平衡,我下载了一个与目标内核匹配的 VM ,因此进行了修复库问题.
整个过程(下载+ yum install gcc)用了不到30分钟.

参考:虚拟机

Ok then, trying to find some balance between elegance and brute force, I downloaded a VM matching the target kernel version, hence fixing library issues.
The whole thing (download + yum install gcc) took less than 30 minutes.

References: Virtual machines, Kernel Version Mapping Table

这篇关于gcc:减少libc所需的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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