Looks like I am having the same issue as this docker-compose-usr-local-bin-docker-compose-line-1-not-command-not-found but when I looked at my '/usr/local/bin/docker-compose' file it was not empty. Also when I try the pip install, it said 'Requirement already satisfied: docker-compose in /usr/lib/python3/dist-packages (1.27.4)' That made me think it was something else.
I am running 64 bit Ubuntu 21.10 server on an RPI 4 with 4gig memory and USB 250gig SSD. I am booting USB. I used the Raspberry Pi Imager v1.6.2 to flash the drive. The uname -r is '5.13.0-1009-raspi'
I can run 'sudo docker run hello-world:latest' without errors.
Just to be clear, my exact error:
ubuntu@ubuntu:~$ docker-compose --version
/usr/local/bin/docker-compose: line 1: Not: command not found
ubuntu@ubuntu:~$
Edit: If my assumption is correct in my answer, then it may have more to do with 64bit arm than Ubuntu. Just in case that is it, I also updated the specs above. I added it was 64 bit Ubuntu.