compose icon indicating copy to clipboard operation
compose copied to clipboard

/usr/local/bin/docker-compose: line 1: Not: command not found

Open smelike opened this issue 8 years ago • 48 comments

Execute the command

[root@localhost ~]# curl -L https://github.com/docker/compose/releases/download/1.23.0-rc2/docker-compose-uname -s-uname -m -o /usr/local/bin/docker-compose % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 9 0 9 0 0 21 0 --:--:-- --:--:-- --:--:-- 61

Context information (for bug reports)

[root@localhost ~]# ll /usr/local/bin/ total 20964 -rwxr-xr-x 1 root root 9 Oct 12 00:16 docker-compose -rwxr-xr-x 1 root root 4839 Aug 3 14:10 erb -rwxr-xr-x 1 root root 548 Aug 3 14:10 gem -rwxr-xr-x 1 root root 192 Aug 3 14:10 irb -rwxr-xr-x 1 root root 589 Aug 3 14:10 rake -rwxr-xr-x 1 root root 940 Aug 3 14:10 rdoc -rwxr-xr-x 1 root root 190 Aug 3 14:10 ri -rwxr-xr-x 1 root root 21432601 Aug 3 14:04 ruby

Output of "docker-compose version"

[root@localhost ~]# /usr/local/bin/docker-compose --version /usr/local/bin/docker-compose: line 1: Not: command not found

Output of "docker version"

[root@localhost ~]# docker --version docker - version 1.5 Copyright 2003, Ben Jansens [email protected]

Usage: docker [OPTIONS]

Options: -help Show this help. -display DISLPAY The X display to connect to. -border The width of the border to put around the system tray icons. Defaults to 1. -vertical Line up the icons vertically. Defaults to horizontally. -wmaker WindowMaker mode. This makes docker a fixed size (64x64) to appear nicely in in WindowMaker. Note: In this mode, you have a fixed number of icons that docker can hold. -iconsize SIZE The size (width and height) to display icons as in the system tray. Defaults to

Output of "docker-compose config"

[root@localhost ~]# docker-compose config /usr/local/bin/docker-compose: line 1: Not: command not found

smelike avatar Oct 12 '18 04:10 smelike

Hi,

In the future please fill out the issue template properly, as this is painful to read through. You can obviously see that the file size for docker-compose is wrong here - there's no way an executable would be 9 bytes in length. This is probably due to the fact that you're on an unsupported OS or architecture, but since you neglected to provide that information, I can't say for sure.

shin- avatar Oct 12 '18 07:10 shin-

There is no info about if OS is supported or unsupported, so this is bug for sure.

samuraii avatar Feb 10 '19 13:02 samuraii

If you open the '/usr/local/bin/docker-compose' file, it would be definitely 'Not Found'.(9 bytes) Your kernel or machine may not be supported.

ailuropoda0 avatar Jun 03 '19 20:06 ailuropoda0

use this should work.

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

raksshet avatar Jun 23 '19 01:06 raksshet

thanks @raksshet its worked

semmersultan avatar Jul 25 '19 05:07 semmersultan

I have a same bug with the 1.24.0 version on Raspbian.

mlsmrc avatar Aug 26 '19 13:08 mlsmrc

I also have the same problem with 1.24.1 on Raspian.

samuelbacaner avatar Aug 30 '19 02:08 samuelbacaner

Same issue on Rock64 ubuntu bionic.... The docker-compose file is located in /usr/local/bin but the file is empty. Now what?

Rampelflik avatar Sep 20 '19 14:09 Rampelflik

@mlsmrc

I have a same bug with the 1.24.0 version on Raspbian.

@samuelbacaner

I also have the same problem with 1.24.1 on Raspian.

Isn't Raspbian a 32 bit OS? The official docs state you can only run compose on 64 bit Linux.

So when you try to curl with $(uname -m) in the url path it won't populate with x86_64, so you're probably trying to access a release that doesn't exist.

mogranjm avatar Oct 03 '19 00:10 mogranjm

@Rampelflik are you sure you're trying to access a real release? Check the output of $(uname -s)and $(uname -m) to make sure curl is trying to access the Linux-x86_64 release.

(If $(uname -m) outputs something other than x86_64, your OS is probably unsupported).

If that's working, check that the release you're trying to access actually exists here.

As @raksshet stated above, your curl call should look like this (or similar): sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

mogranjm avatar Oct 03 '19 00:10 mogranjm

I figured out the problem , for me it was caused by the fact that was trying to download version 1.25.2-rc1 which is not available for some reason. SO i downgraded to 1.24.0 and it worked.

aodr3w avatar Jan 20 '20 12:01 aodr3w

@AndrewOdiit you forgot the "v" introduced in tag "v1.25.2"

ericslandry avatar Jan 21 '20 10:01 ericslandry

For those trying to install on Raspbian (ARM64) or another unsupported architecture, you can install docker-compose via pip.

lgrosz avatar Jul 08 '20 03:07 lgrosz

I am trying to install docker-compose on redhat 7 of ppc64le(Power9 server) arch type still getting same error. curl command gives below output , seems it has downloaded 9B.

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9 100 9 0 0 25 0 --:--:-- --:--:-- --:--:-- 25

Thanks venkat.

venkat44488 avatar Aug 19 '20 16:08 venkat44488

I am facing the same error

Using sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Output of uname -s : Linux Output of uname -m : i686

ADI10HERO avatar Aug 23 '20 10:08 ADI10HERO

@ADI10HERO 32 bit architectures are not supported (you're using i686), you need to be running a 64 bit processor and OS (i.e. uname -m must return x86_64) to install docker-compose this way. You might want to try installing via pip as suggested above.

For those trying to install on Raspbian (ARM64) or another unsupported architecture, you can install docker-compose via pip.

See https://github.com/docker/compose/releases/1.26.2 for downloads available in the latest release (note there's no docker-compose-Linux-i686)

mogranjm avatar Aug 24 '20 01:08 mogranjm

you all folks are downloading a "Not Found" string returned by a 404 http status code. Your target file for target architecture doesn't exist.

/usr/local/bin/docker-compose: line 1: Not: command not found

the Not above is realated to what I've explained.

did you guys tried to run nano /usr/local/bin/docker-compose ?

rodrigoreis avatar Oct 19 '20 04:10 rodrigoreis

Who trying to install docker compose on raspbian use this guide https://withblue.ink/2020/06/24/docker-and-docker-compose-on-raspberry-pi-os.html

specialistvlad avatar May 05 '21 20:05 specialistvlad

sudo apt update
sudo apt install -y python3-pip libffi-dev
sudo pip3 install docker-compose

stepri avatar May 14 '21 10:05 stepri

sudo rm /usr/local/bin/docker-compose sudo pip uninstall docker-compose

then sudo pip install docker-compose

then docker-compose --version

This work for me

stepthevir2 avatar Jun 23 '21 17:06 stepthevir2