从AIX5.3上的Source构建的Python 2.7不会对libpython2.7.so执行

时间:2016-08-13 13:03:02

标签: python python-2.7 aix

这是在AIX 5.3上。

当我运行从源代码构建的Python时,我收到以下错误(这是尽管路径中存在库,并且该路径存在于LD_LIBRARY_PATH变量中。)。

a776q /app/appadm/.Mim>python2.7/bin/python
exec(): 0509-036 Cannot load program python2.7/bin/python because of the following errors:
        0509-150   Dependent module libpython2.7.so could not be loaded.
        0509-022 Cannot load module libpython2.7.so.
        0509-026 System error: A file or directory in the path name does not exist.
a776q /app/appadm/.Mim>export LD_LIBRARY_PATH=/app/appadm/.Mim/python2.7/lib/:$LD_LIBRARY_PATH
a776q /app/appadm/.Mim>python2.7/bin/python
exec(): 0509-036 Cannot load program python2.7/bin/python because of the following errors:
        0509-150   Dependent module libpython2.7.so could not be loaded.
        0509-022 Cannot load module libpython2.7.so.
        0509-026 System error: A file or directory in the path name does not exist.
a776q /app/appadm/.Mim>ls -ltr /app/appadm/.Mim/python2.7/lib/
total 5192
-r-xr-xr-x   1 appadm   appadm      2637588 13 ago 07:50 libpython2.7.so
drwxr-sr-x  28 appadm   appadm        14336 13 ago 07:59 python2.7
drwxr-sr-x   2 appadm   appadm          512 13 ago 07:59 pkgconfig
a776q /app/appadm/.Mim>ldd python2.7/bin/python
python2.7/bin/python needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libpthreads.a(shr_comm.o)
         /usr/lib/libpthreads.a(shr_xpg5.o)
Cannot find      /unix
         /usr/lib/libcrypt.a(shr.o)

我使用以下

从源代码构建了python
export PATH=/usr/bin:/usr/vac/bin
export CC=/usr/vac/bin/xlc_r
./configure --with-gcc="xlc_r" --disable-ipv6 AR="ar" --prefix=/app/appadm/.Mim/python2.7 --enable-shared
make
make install

请指导

1 个答案:

答案 0 :(得分:0)

最后问题是我在设置 LD_LIBRARY_PATH 时应该在AIX上设置 LIBPATH