我正在尝试在 Ubuntu 20.04(ARM Rasberry PI 4)上安装 docker-compose。但是当我遵循Docker 文档的官方指南时,我不能使用标准路由,因为 GitHub 上没有 Linux-aarch64 的版本,只有 x86。
但是当我通过我尝试替代版本时pip install
收到错误
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2kn5p6q3/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2kn5p6q3/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-u7mx6nfb/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/cffi
cwd: /tmp/pip-install-2kn5p6q3/cffi/
Complete output (36 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/cffi
copying cffi/recompiler.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/vengine_gen.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/commontypes.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/setuptools_ext.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/cparser.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/api.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/backend_ctypes.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/ffiplatform.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/__init__.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/vengine_cpy.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/verifier.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/model.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/lock.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/pkgconfig.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/error.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/cffi_opcode.py -> build/lib.linux-aarch64-3.8/cffi
copying cffi/_cffi_include.h -> build/lib.linux-aarch64-3.8/cffi
copying cffi/parse_c_type.h -> build/lib.linux-aarch64-3.8/cffi
copying cffi/_embedding.h -> build/lib.linux-aarch64-3.8/cffi
copying cffi/_cffi_errors.h -> build/lib.linux-aarch64-3.8/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.linux-aarch64-3.8
creating build/temp.linux-aarch64-3.8/c
aarch64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.8/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2kn5p6q3/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2kn5p6q3/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-u7mx6nfb/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/cffi Check the logs for full command output.