2

I'm trying to install docker-compose on Ubuntu 20.04 (ARM Rasberry PI 4). But when I follow official guide on Docker Documentation, I can't use standard route as there is no version on GitHub for Linux-aarch64, only x86.

But when I try alternative version via pip install I receive error

    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.
0
2

According to Ubuntu Package Search, ffi.h is in libffi-dev package. To install that package, run

sudo apt install libffi-dev

After installing the package, retry installation of docker-compose.

1
  • The command from Kulfy also works for Pi Os 'buster' in order to install docker-compose. – MvB Aug 30 '20 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.