Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenzo0107/7d402a7af499b65ad75c to your computer and use it in GitHub Desktop.
Save kenzo0107/7d402a7af499b65ad75c to your computer and use it in GitHub Desktop.
# pythonコマンド実行パス検索
which python
/usr/local/bin/python
# 共有ライブラリの依存関係を表示
ldd /usr/local/bin/python
linux-vdso.so.1 => (0x00007fff717fd000)
libpython2.7.so.1.0 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003c54c00000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003c54800000)
libutil.so.1 => /lib64/libutil.so.1 (0x0000003c5d800000)
libm.so.6 => /lib64/libm.so.6 (0x0000003c55000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003c54400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003c54000000
# ↑libpython2.7.so.1.0 => not found となっている。
# 検索すると存在する
find /usr/local/src/Python-2.7.6/ -type f -name 'libpython2.7.so.1.0'
/usr/local/src/Python-2.7.6/libpython2.7.so.1.0
# 存在しているのでシンボリックを張る。
ln /usr/local/src/Python-2.7.6/libpython2.7.so.1.0 /lib64/libpython2.7.so.1.0
# python バージョン確認で掲題のエラーが表示されないか確認する
python -V
Python 2.7.6
@Sanrrone
Copy link

thanks! locate dont find anything

@alexband
Copy link

sometime you need to use ln -s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment