5

I'm trying to install and use docker-compose. I was using it earlier today and seemed to be throwing errors about my docker-compose file not being the right version, so I tried fixing it by uninstalling it and then reinstalling the latest docker-compose. When I uninstalled it I used pip uninstall. when I reinstalled I used the other way to install docker-compose - using:

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

So anyway, now when I try and use docker-compose it is throwing this error:

io:~$ docker-compose version
bash: /usr/bin/docker-compose: No such file or directory

See how the paths are different? The new version is installed in:

/usr/local/bin/docker-compose

Where this error says it has been looking in /usr/bin/docker - possibly where the docker-compose that I removed earlier today was installed. Can anybody help me address this problem?

thanks

1 Answer 1

4

Check if /usr/local/bin is in your PATH by running:

echo $PATH

If it isn't in the colon separated list of directories, add it to your PATH so bash can find the executable:

export PATH="/usr/local/bin:$PATH"
2
  • Thanks, i just checked it now, and it is in there already. The other thing I did is see if I could run the docker-compose command again this morning. Now it's working. Maybe my computer needed a sleep.Cheers.
    – Bucephalus
    Apr 12, 2018 at 21:53
  • I had the same case - had to leave the current shell and log back in - then it just started working (although I did see the proper path in the first place)
    – userfuser
    May 24, 2023 at 9:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .