I have compiled a program on my own Ubuntu system. Now I want to run it on a foreign Ubuntu system with same architecture but slightly outdated shared libraries. How do I get the libraries from my own system work on the foreign one? I'm not root on the foreign machine.
So far I tried to copy the files listed by me@mymachine> ldd myprogram
together with myprogram
into the same directory on the foreign machine. Upon executing me@foreignmachine> ./myprogram
there, I expected that the libraries in the same directory would be loaded instead of the outdated ones in the library path. However, I get the error messages
/usr/lib64/libgomp.so.1: version `GOMP_4.0' not found (required by ./myprogram)
/lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./myprogram)
So obviously the libraries I copied have not been loaded, as they had the right version on my system (where I compiled the program).
Is there another working kludge? Static linking doesn't work either (as expected).
Edit: ldd myprogram
yielded:
linux-vdso.so.1 => (0x00007ffccabf4000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f149b334000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f149b038000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f149ae15000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f149abfe000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f149a9bf000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f149a7a1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f149a3e3000)
/lib64/ld-linux-x86-64.so.2 (0x00007f149b67d000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f149a1db000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1499fd6000)
So I copied the 10 files /lib/x86_64-linux-gnu/libdl.so.2
, /lib/x86_64-linux-gnu/librt.so.1
, /lib64/ld-linux-x86-64.so.2
etc. to the foreign system. According to what I've found, it seems to be OK not to care about linux-vdso.so.1
as it's generated automatically inside the kernel.
LD_LIBRARY_PATH="." ./myprogram
and got the messagememory fault
. How do I inquire what's still missing? – Horst Grünbusch May 21 '15 at 14:22export LD_LIBRARY_PATH="." ; strace ./myprogram
? There might be a hint. – Stéphane Gourichon May 21 '15 at 15:14