If I run a binary compiled on a newer Linux distro on an older Linux distro, I may get an error like this:

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

How can I check the version of the dynamic linker in a Linux system? Is it provided by a package? If so, what's the name of the package?

And 2 theoretical questions:

  • Is it possible to update the dynamic linker? (I don't think I'm going to do this but I just want to know)
  • Is it possible to use a dynamic linker outside of the system paths? (e.g. one that is compiled/installed by a unprivileged user)

The loader is provided by glibc. Look for /lib{,64}/ld-*.so. The number after the dash is the version of glibc that provides it. Updating glibc will provide a newer linker.

| improve this answer | |
  • I see. If so, can I use an alternate linker by specifying LD_LIBRARY_PATH? – netvope Jun 3 '10 at 6:12
  • It's the loader that reads and processes the $LD_* variables in the first place. – Ignacio Vazquez-Abrams Jun 3 '10 at 6:39
  • 3
    I used a hex editor to change the hard-coded loader path from /lib64/ld-linux-x86-64.so.2 to a newer ld.so, and pointed LD_LIBRARY_PATH at a directory containing a newer libc.so.6. Now the program runs happily :) – netvope Jun 4 '10 at 18:51
  • nice hack there! – sourcedelica Oct 24 '11 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.