Permission denied when trying to install compose on Ubuntu

Hello

I am trying to install Compose, and am following the instructions on https://docs.docker.com/compose/install/
However, when I run

curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

I get Permission denied, even when I use sudo.

How can I fix this?

Thanks

Ok, I actually got a little further by using:

curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` >sudo  /usr/local/bin/docker-compose

However, now I get:

curl: (3) <url> malformed

Try this:

sudo curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-Linux-x86_64 > docker-compose

and then mv the file into /usr/local/bin
and chmod it to make executable. Worked for me.

Do:
uname -s
if you’re not running on linux

The sudo is not going to work as expected. You can read more about this on http://ubuntuforums.org/showthread.php?t=1544087

That aside, I am still getting the following:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   405    0   405    0     0    564      0 --:--:-- --:--:-- --:--:--   565
100 5134k  100 5134k    0     0   645k      0  0:00:07  0:00:07 --:--:-- 1198k
curl: (3) <url> malformed

I installed it that way yesterday.

Which command did you issue in curl?

I used

 curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

Now I used:

sudo wget https://github.com/docker/compose/releases/download/1.1.0/docker-compose-Linux-x86_64 -O /usr/local/bin/docker-compose

And that seemed to have worked.

Honestly, I don’t understand why it is so difficult to install docker and docker-compose (so far) I mean this is an app that only works in linux and sure there are lots of varieties but ubuntu is a BIG on.
Why do I have to dig around, read troubleshooting tickets and who knows what, just to install the thing???
Now, I come from windows which is a big mark against me but for the love of god, can’t you get your own software to run on the leading OS? Even MS can pull that off, most times.

Hi There,
I’m facing the same problem when installing on Debian (wheezy), not sure if this solution is correct or if it’s just a workaround.
I will try this solution just to proceed but not knowing if this is the correct solution is a bit of a gamble.

Can somebody please explain why it happens and what is the correct solution.

Cheers

sudo -i should be first inserted before going for the below command

curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-uname -s-uname -m> /usr/local/bin/docker-compose

This solution is really working. Recommended by myself :wink: