How to Install Newer GLIBC on RHEL/CentOS 5.x

centosglibcrhel5

I have a situation where a group of developers is attempting to deploy a binary application to a series of RHEL 5.5 and CentOS 5.5 servers. Unfortunately, the application was developed on another platform (Gentoo) and execution results in a GLIBC dependency error:

libc.so.6: version `GLIBC_2.7' not found (required by
/path/to/application/bin/program.app)

RHEL/CentOS 5.x is standardized on GLIBC 2.5 (with patches and backports, but still stuck at 2.5)

I've been abe to get around other library requirements by copying individual libs and using LD_PRELOAD in wrapper scripts. My stance is that RHEL is meant to maintain binary compatibility throughout its support life, and that I don't have any good options for upgrading such a critical library on the systems. The environment used to be mainly Gentoo, so the developers are used to being able to upgrade packages piecemeal without any true dependency issues.

I think the proper solution is to recompile for the target systems. Due to the method of application distribution, this may not be an option. Are there any other solutions or suggestions?

Best Answer

  • link statically(-static)
  • use rpath. rpath overwrite the default search path(-rpath,/srv/myapp/lib)