Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission Denied while Installing Docker Machine in Ubuntu

Tags:

ubuntu

I am new in Ubuntu and I was trying to install Docker Machine in my Ubuntu.

curl -L https://github.com/docker/machine/releases/download/v0.7.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \ chmod +x /usr/local/bin/docker-machine

When I try this code it Shows the Error

bash: /usr/local/bin/docker-machine: Permission denied

Please help me to solve the problem. Also I was just try with Sudo. But it shows the same problem. Please help. Thank you.

like image 695
Melbin Mathai Avatar asked Jul 18 '16 09:07

Melbin Mathai


Video Answer


1 Answers

I had the same issue, fixed by running the following:

sudo -i

curl -L https://github.com/docker/machine/releases/download/v0.7.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine

After that docker-machine appears in the /usr/local/bin/, but somehow chmod from the command above still don't work. To fix that type in the new terminal:

sudo chmod +x /usr/local/bin/docker-machine

curl -L https://github.com/docker/machine/releases/download/v0.7.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine

and the docker-machine will be installed.

like image 142
user48115 Avatar answered Oct 14 '22 05:10

user48115