docker-compose fails to install on Pine A64 on DietPi 7.1.2 Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by Joulinar »

as well the used components could be an issue. I see docker_compose used in quite some version from cache. Looks like all available version used. But it should be docker_compose-1.29.1-py2.py3-none-any.whl only.

Code: Select all

Collecting docker-compose
  Downloading docker_compose-1.29.1-py2.py3-none-any.whl (114 kB)
Same for docker

Code: Select all

Collecting docker[ssh]>=5
  Downloading docker-5.0.0-py2.py3-none-any.whl (146 kB)
Better to reset the cached versions I would say.



@MichaIng
On my RPi4 64bit, libffi-dev is/was not required.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by MichaIng »

Like it's building all cached Docker Compose versions against all cached Docker wheels. Still the question why all of those have been cached in the first place.

Probably we should actively purge or skip the cache when calling pip, to avoid issues related to it. pip cache purge is actually for Python 2, so pip3 cache purge should have the intended effect.

libffi-dev is btw required for many other Python software, so it would not be that surprising. Strange however that it probably is the case for PINE A64 while not being the case for RPi 64-bit. Probably it also was for a specific Docker Compose (or Docker) version that is not used on successful installs.

Will do a test now as well.
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by Joulinar »

@MichaIng
would it be an option to use --no-cache-dir while calling pip?



@tfmeier
pls can you cancel your installation and try running following

Code: Select all

pip3 install docker-compose --no-cache-dir
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by tfmeier »

Thanks guys for the support. Doing the following the install went through

Code: Select all

clear APT cache
sed -Ei 's@https://bootstrap\.pypa\.io/(3\.5/|)get-pip\.py@https://bootstrap.pypa.io/pip/\1get-pip.py@' /boot/dietpi/dietpi-software
apt install libffi-dev
install docker-compose
and I was able to run docker-compose although the following warning appears

Code: Select all

/usr/local/lib/python3.5/dist-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 3.5 support will be dropped in the next release of cryptography. Please upgrade your Python.
  from cryptography.hazmat.backends import default_backend
Not sure what you'd have to do so that the docker-compose install works straight out of the box from the dietpi-software UI and this warning about Python 3.5 no longer appears.

If you make any changes and need me to re-run this I'm more than happy to do so
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by Joulinar »

Are you running Debian Buster or Stretch? Because on Buster you should have a higher Python version.

The warning on Python 3.5 is actually correct as this is an old version
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by tfmeier »

This is the output

Code: Select all

root@DietPi:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@DietPi:~#
User avatar
Joulinar
Posts: 4502
Joined: Sat Nov 16, 2019 12:49 am

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by Joulinar »

Yup Stretch. This is the old Debian version. Actual version is Buster. On Stretch, Python 3.5 is the latest available version and will not be updated anymore. Btw next Debian version, Bullseye, will be released this summer and Stretch becomes very old ;)

Not sure if possible but you should consider updating to Buster :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by MichaIng »

On my ARMv8 container it as well worked without libffi-dev
But was on Buster as well, will try on Stretch.
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by MichaIng »

Issue verified on Stretch:

Code: Select all

      building '_cffi_backend' extension
      creating build/temp.linux-aarch64-3.5
      creating build/temp.linux-aarch64-3.5/c
      aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-XIOK8o/python3.5-3.5.3=. -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.5m -c c/_cffi_backend.c -o build/temp.linux-aarch64-3.5/c/_cffi_backend.o
      c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
       #include <ffi.h>
                       ^
      compilation terminated.
      error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for cffi
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "/usr/local/lib/python3.5/dist-packages/setuptools/installer.py", line 126, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp492vv5zo', '--quiet', 'cffi>=1.4.1']' returned non-zero exit status 1
CFFI backend is compiled, requiring the FFI development headers.

Checked again on Stretch VM and ARMv7 to be sure, but I only on ARMv8 it needs to be compiled, else its available as pre-compiled wheel. I'll add a fix to dietpi-software: https://github.com/MichaIng/DietPi/pull/4342
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: docker-compose fails to install on Pine A64 on DietPi 7.1.2

Post by tfmeier »

Joulinar wrote: Tue May 04, 2021 4:00 pm Yup Stretch. This is the old Debian version. Actual version is Buster. On Stretch, Python 3.5 is the latest available version and will not be updated anymore. Btw next Debian version, Bullseye, will be released this summer and Stretch becomes very old ;)

Not sure if possible but you should consider updating to Buster :?
Hmm, happy to do that as per my first post this Pine64 didn't do anything other than collecting dust :)

How would I upgrade to Buster? There was only 1 image for the Pine64
Post Reply