Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)
share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|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
2  
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! –  ericacm Oct 24 '11 at 20:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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