0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker machineのインストールがすんなり出来なかった件(Docker for Macユーザ向け)

Last updated at Posted at 2021-03-11

はじめに

新しく貸与されたMacにDocker for Macをインストールしたら、Docker machineが入ってなかったので、インストールしようとしたらエラーが出た。

zsh: permission denied: /usr/local/bin/docker-machine

環境

MacOSはCatalinaです。

パーミッションを変更

権限がないみたいなので、権限を変更します。

変更前の状態を確認する

% ls -la  /usr/local | grep bin 
drwxr-xr-x  26 root  wheel  832  3 11 20:04 bin

変更する

% sudo chmod 777 /usr/local/bin 
Password:
% ls -la  /usr/local | grep bin 
drwxrwxrwx  26 root  wheel  832  3 11 20:04 bin

インストールする

※バージョンが更新されるので、実際にインストールする際のコマンドは下記のページを確認して下さい。

% curl -L https://github.com/docker/machine/releases/download/v0.16.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   634    0   634    0     0    795      0 --:--:-- --:--:-- --:--:--   794
100 38.5M  100 38.5M    0     0   736k      0  0:00:53  0:00:53 --:--:--  518k
%

Complete!!とか出ないんですね...。

インストールされたか確認する

% docker-machine ls
NAME   ACTIVE   DRIVER   STATE   URL   SWARM   DOCKER   ERRORS

パーミッションをもとに戻す

% sudo chmod 755 /usr/local/bin 
Password:
@~ % ls -la  /usr/local | grep bin 
drwxr-xr-x  27 root  wheel  864  3 11 20:30 bin

ちゃんと権限が変更前とおなじになりました。
インストールした分、容量がちょっと増えてますね
パーミッションを変えるときって、なんかドキドキすします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?