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

I try to install docker-compose via the UI (i.e. dietpi-software on the command line). After a while I get the error message:

- Command: python3 ./get-pip.py
│  - Exit code: 1
│  - DietPi version: v7.1.2 (MichaIng/master) | HW_MODEL: 40 | HW_ARCH: 3 | DISTRO: 4
│  - Image creator: DietPi Core Team
│  - Pre-image: ARMbian
│  - Error log:
│
│ Hi there!
│
│ The URL you are using to fetch this script has changed, and this one will no
│ longer work. Please use get-pip.py from the following URL instead:
│
│     https://bootstrap.pypa.io/pip/3.5/get-pip.py
│
│ Sorry if this change causes any inconvenience for you!
│
│ We don't have a good mechanism to make more gradual changes here, and this
│ renaming is a part of an effort to make it easier to us to update these
│ scripts, when there's a pip release. It's also essential for improving how we
│ handle the `get-pip.py` scripts, when pip drops support for a Python minor
│ version.
│
│ There are no more renames/URL changes planned, and we don't expect that a need
│ would arise to do this again in the near future.

What do I need to do to install this as I’m not sure what to do with this error message.

Hi,

thy for your message. Let me have a look. One question: You are running Debian Stretch?

cat /etc/os-release

Looks like developer for get-pip.py changed something on their side which require an update on the download url

DISTRO: 4, so it’s Stretch, yes. Strange only because I thought we implemented the fix already to have the Python 3.5 script pulled there:
https://github.com/MichaIng/DietPi/blob/master/dietpi/dietpi-software#L3472-L3474

It seems to have not worked as intended.

I’ll try to replicate on VM.

Ah, it’s about /pip/ subdirectory, okay that is a new change, all good :slight_smile:.

yup took me a while as well to figure out the change :rofl:

MichaIng
Do you have a cool sed command to be able to add the missing sub dir? At least that would help the requestor as a quick fix :slight_smile:

Good idea, worth another MOTD fix as well:

sed -Ei 's@https://bootstrap\.pypa\.io/(3\.5/|)get-pip\.py@https://bootstrap.pypa.io/pip/\1get-pip.py@' /boot/dietpi/dietpi-software

I really need to get grip on sed :stuck_out_tongue:

And regular expressions in general, used with grep, awk, perl, shells, nearly everywhere in Linux/UNIX :slight_smile:: https://de.wikipedia.org/wiki/Regulärer_Ausdruck#Reguläre_Ausdrücke_in_der_Praxis

This is my output


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/"

I tried to follow the discussion but not sure what to do next. Do I need to create folder and re-run the command?

The command from this post should fix it https://dietpi.com/forum/t/docker-compose-fails-to-install-on-pine-a64-on-dietpi-7-1-2/5268/7

You should be able to perfectly the installation afterwards

hmm, the above URL brings me to my post or are you referring to the sed command?

sed -Ei 's@https://bootstrap\.pypa\.io/(3\.5/|)get-pip\.py@https://bootstrap.pypa.io/pip/\1get-pip.py@' /boot/dietpi/dietpi-software

meaning rather than starting the docker-compose install from the UI I simply use this command?

The installation is failing right? Therefore you need to run the sed command to apply a correction. This will adjust the installation script. Once done you can start the installation.

Yep. I figured that out in the meantime. Applied the sed command and re-ran the install.

Unfortunately it doesn’t finish. Hangs halfway through the install. The attached shows the CPU at 100% although the RAM is only at about 30% (2GB RAM).

Tried to re-run without success. Stops at the same spot. Is there a way for me to delete the local cache and download the packages again or is there anything else I could try?

this could take time while compiling. Let it run for 1 hour pls.

It ran for more than 2 hrs before I killed it. Looking at the resource monitor I still see CPU% and time incrementing. Does this mean the process still runs? How long can I expect this to run?

Also what about the cache? The log says Using cached ..... Could this be corrupt or do the packages automatically refresh every time I restart the process?

Restarted the installation (still running after 1hr 45) but found this error earlier on the console

      running build_ext
      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: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-66i57p6p/cffi_6d177a9a6c0742e0b6d476b839622794/setup.py'"'"'; __file__='"'"'/tmp/pip-install-66i57p6p/cffi_6d177a9a6c0742e0b6d476b839622794/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-759asbzg/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-0ekuz2br/overlay --compile --install-headers /tmp/pip-build-env-0ekuz2br/overlay/include/python3.5m/cffi Check the logs for full command output.
  ----------------------------------------

to clean the cache you could try running pip cache purge

Will do a test on my 64bit RPi4 as well now.

Ok. Let me know how you go.

As for my install it’s now running for a good 11 hrs :slight_smile: but still runs. My Internet connection is top (100Mbps) but it has been on the last step for at least 1 hr. Anyway I continue to let it run in hope it’ll finish in the next few days :rofl:

sorry for late response but got hijacked by my family :sunglasses:

11 hours is definitely way to long. Even on my old RPi1 it was finishing in less than 1 hour. Will run a test on my RPi4 64bit now.

That long time does not sound normal anymore. And the PINE A64 is not an RPi Zero, but quite capable.

The compilation error above indicates missing library headers:

apt install libffi-dev