3

I'm trying to run a tool that uses Python 2.7.6 but it keeps returning the same error message:

python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

I see that people have had this problem before, but it seems that the advice is to export to LD_LIBRARY_PATH and I don't think this is the problem here (as shown below):

ldd 'which python' gives:

linux-vdso.so.1 =>  (0x00007fff19ac0000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000360c200000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000360be00000)
libutil.so.1 => /lib64/libutil.so.1 (0x000000361ce00000)
libm.so.6 => /lib64/libm.so.6 (0x000000360ce00000)
libc.so.6 => /lib64/libc.so.6 (0x000000360ba00000)
/lib64/ld-linux-x86-64.so.2 (0x000000360b600000)

echo $LD_LIBRARY_PATH contains the folder /software/src/Python-2.7.6

ls /software/src/Python-2.7.6 | grep libpython2.7

gives:

libpython2.7.a
libpython2.7.so
libpython2.7.so.1.0

Is there something in the configuration of my python installation that is wrong here?

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
  • Check it: http://stackoverflow.com/questions/7880454/python-executable-not-finding-libpython-shared-library – mortymacs May 15 '14 at 16:55
  • Like i wrote, exporting to LD_LIBRARY_PATH does not work somehow. LD_LIBRARY_PATH contains a folder that in turn contains the libpython files needed. Still somehow it's not working. – user3641718 May 15 '14 at 17:05
  • Check it again, I believe my answer will help you since it looks like you're compiling from source. – Foosh Jan 14 '15 at 21:21
  • I have a simliar problem LD_LIBRARY_PATH is set ,but ld could not find unless I use ld -LXXXX -liomp5 for example, simply ld -liomp5 does not work – sunxd May 07 '17 at 01:04

0 Answers0