I have a 64 bit Ubuntu Linux box. Recently I was given an old compiled binary that used to run on an old, retired server, which I THINK was a 2007-era Redhat distribution.
As you might expect, the binary does not work because of library incompatabilities. Binary-only sucks and isn't MEANT to be portable. Yet I'm still stuck with just the binary, and a need to run it. So my question becomes how to deal with the (painful) problem of figuring just what libraries the binary is expecting, finding those libraries, and forcing the program to use them. What's the proper strategy for doing this?
I'll give you the specific example of my binary, which runs but immediately fails with the error message
datab2txt: relocation error: /lib64/libnss_files.so.2: symbol __rawmemchr, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
I'm interested in the strategy to diagnose this since I expect that if I solve this problem (by finding an old version of glibc??) there may be yet more libraries to resolve.
What's the best strategy for solving this? I am guessing I need to identify the libraries needed (how?), find them, and force the program to use them (how? overriding LD_LIBRARY_PATH ?)
Thanks!
Edit: using ldd datab2txt
gives the error not a dynamic executable
. Uhoh.. what does that mean?
Additionally, I ran file and got:
% file datab2txt
datab2txt: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.4.0, not stripped