Wednesday, March 11, 2009

Linux: Error while loading shared libraries

Just indicate the folder containing the library:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/folder/with/lirbary To check what libraries are used by a given program, one can use ldd:ldd ./ls971_mpphpmpi.e110
libmpio.so.1 => not found
libmpi.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x0000003874a00000)
libm.so.6 => /lib64/libm.so.6 (0x0000003874600000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003885800000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003885400000)
libc.so.6 => /lib64/libc.so.6 (0x0000003874200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003873200000)