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

I have docker-compose installed. when I execute “which docker-compose”, It returns “/usr/local/bin/docker-compose”. I also updated the permission by executing the “sudo chmod +x /usr/local/bin/docker-compose”. I have “docker-compose.yaml” file in one of the folder.

When I execute “sudo /usr/local/bin/docker-compose -f /home/vinit/tools/kafka/docker-compose.yml up”, it returns “/usr/local/bin/docker-compose: 1: Not: not found”

What kind of system are you running, How did you install Docker and compose?

Did you check the doc? We usually just run the convenience script.

I guess you tried to download docker compose using curl or wget and it returned a “Not found” error which was saved in the docker-compose file so when you try to run it, it actually tries to execute “Not” which is not a real command.

Try this:

less /usr/local/bin/docker-compose

When I’m not sure file is binary or not, I usually use “less” which detects binaries, but if it is a text file you can see the content.

1 Like

Thank you, Akos.
You were right. It was not installed correctly. when I executed “less /usr/local/bin/docker-compose” returned an empty file.
Thank you once again for your help.

i have a question like yours. I want to install a compose in a router (Xiaomi Ax9000).but the compose is hard to download.

Why? You can download any release from github Releases · docker/compose · GitHub

You should check if your hardware (CPU and OS) is supported by Docker engine (link).