我正在尝试在 AIX 服务器上使用 pip for python 3.5 安装 cffi 包,但它失败并出现关于 xlc_r 的错误以及关于找不到 libffi 包的错误。
点安装 cffi
ERROR: Command errored out with exit status 1:
command: /path/to/my/venv/privpyenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2x788gcb/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2x788gcb/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6kyp6skh/install-record.txt --single-version-externally-managed --compile --install-headers /path/to/my/venv/privpyenv/include/site/python3.5/cffi
cwd: /tmp/pip-install-2x788gcb/cffi/
Complete output (68 lines):
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
unable to execute 'xlc_r': Not a directory
unable to execute 'xlc_r': Not a directory
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)
Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.
running install
running build
running build_py
creating build
creating build/lib.aix-7.1-3.5
creating build/lib.aix-7.1-3.5/cffi
copying cffi/__init__.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/api.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/backend_ctypes.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/cffi_opcode.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/commontypes.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/cparser.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/error.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/ffiplatform.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/lock.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/model.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/pkgconfig.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/recompiler.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/setuptools_ext.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/vengine_cpy.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/vengine_gen.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/verifier.py -> build/lib.aix-7.1-3.5/cffi
copying cffi/_cffi_include.h -> build/lib.aix-7.1-3.5/cffi
copying cffi/parse_c_type.h -> build/lib.aix-7.1-3.5/cffi
copying cffi/_embedding.h -> build/lib.aix-7.1-3.5/cffi
copying cffi/_cffi_errors.h -> build/lib.aix-7.1-3.5/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.aix-7.1-3.5
creating build/temp.aix-7.1-3.5/c
xlc_r -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr4 -q64 -I/opt/buildaix/includes -I/usr/include/ffi -I/usr/include/libffi -I/path/to/my/venv/privpyenv/include -I/opt/include/python3.5m -c c/_cffi_backend.c -o build/temp.aix-7.1-3.5/c/_cffi_backend.o
unable to execute 'xlc_r': Not a directory
error: command 'xlc_r' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /path/to/my/venv/privpyenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2x788gcb/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2x788gcb/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-6kyp6skh/install-record.txt --single-version-externally-managed --compile --install-headers /path/to/my/venv/privpyenv/include/site/python3.5/cffi Check the logs for full command output.
我在哪里找到 libffi:
/opt/freeware/lib > ls -lrt | grep libffi
-rwxr-xr-x 1 root system 25553 Nov 25 2014 libffi.so.6
-rwxr-xr-x 1 root system 92378 Nov 25 2014 libffi.so.5
-rwxr-xr-x 1 root system 250592 Nov 25 2014 libffi.a
我试过这个http://www.rootvg.net/content/view/812/169/。不工作。我在 AIX 7.1 上使用 python3.5
在这里期待有关修复的建议。