我正在CentOS 5上安装Python 2.7。我按照以下步骤构建和安装Python:
./configure --enable-shared --prefix=/usr/local
make
make install
当我尝试运行/ usr / local / bin / python时,出现此错误消息
/usr/local/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
当我在/ usr / local / bin / python上运行ldd时,我得到
ldd /usr/local/bin/python
libpython2.7.so.1.0 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000030e9a00000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000030e9200000)
libutil.so.1 => /lib64/libutil.so.1 (0x00000030fa200000)
libm.so.6 => /lib64/libm.so.6 (0x00000030e9600000)
libc.so.6 => /lib64/libc.so.6 (0x00000030e8e00000)
/lib64/ld-linux-x86-64.so.2 (0x00000030e8a00000)
如何告诉Python在哪里可以找到libpython?
天涯尽头无女友
相关分类