重新链接共享库到不同版本的libc [英] Relink a shared library to a different version of libc

查看:518
本文介绍了重新链接共享库到不同版本的libc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我(的.so)编译的libc(GLIBC2.4)的特定版本Linux的共享库,我需要与不同版本的libc中的使用它的系统上。我没有有问题的库源代码,所以我不能重新编译为新系统。是否有可能以某种方式改变依赖于该库到不同的libc?

I have a linux shared library (.so) compiled with a specific version of libc (GLIBC2.4) and I need to use it on a system with different version of libc. I do not have sources for the library in question so I cannot recompile for the new system. Is it somehow possible to change the dependencies in that library to a different libc?

推荐答案

如果您需要与旧的glibc系统上的。所以,你需要在源$ C ​​$ c和重新编译/与旧的glibc重新链接它。另一种方法是在非缺省位置旧系统上安装所需的glibc和调整LD_LIBRARY_PATH为需要这个。所以可执行

If you need the .so on a system with an older glibc, you would need the source code and recompile/relink it with the older glibc. The alternative is to install the required glibc on the old system in a non-default location and adjust the LD_LIBRARY_PATH for the executable that needs this .so

如果有一个更新的glibc的相反,它通常不应是一个问题,因为glibc的往往是向后兼容。

If there's a newer glibc rather, it should normally not be a problem as glibc tend to be backwards compatible.

这篇关于重新链接共享库到不同版本的libc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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