无法安装 docker - 权限被拒绝?

Can't install docker - Permission denied?

我正在尝试在 guide.

之后安装 docker-机器
$ curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \
> chmod +x /usr/local/bin/docker-machine

错误:

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

为什么?如何解决这个问题?

我正在使用 Xubuntu 16.04。

这在 issue 652

中讨论

要么你 chown 那个文件夹

sudo chown -R $(whoami) /usr/local/bin

或(更好),如 this PR

Note: If you get a "Permission denied" error, your /usr/local/bin directory probably isn't writable and you'll need to install Compose as the superuser.
Run sudo -i, then the two commands above, then exit.