2

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

2

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"
| improve this answer | |
  • 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 '18 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.