18
19

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 5 years have passed since last update.

macOS Sierra Docker Toolbox のインストーラがエラるので Brew cask でインストールした

Last updated at Posted at 2016-09-26

Docker Toolbox がインストールできない

環境: macOS Sierra, Docker toolbox 1.12.0

Docker Toolbox はここからダウンロード

インストーラを起動して、「続ける」をクリックしたときに「内部エラー」「例外名: NSRangeException」が出る場合


以下、やってみたけど意味無かった

App Store の「アップデート」から、macOS と Xcode のアップデートをインストール
Xcode を1回起動しておく。
ターミナルから $ xcode-select install
インストーラを再実行。結果、変わらず


Homebrew cask で入れるといい

brew を更新

$ brew update
...
Error: /usr/local must be writable!
...

というエラーが出た。El Capitan 未満の brew をずっと更新してなかったからかな

パーミッションを変更

$ sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

$ brew update

アップデートできた。

==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew!
Homebrew no longer needs to have ownership of /usr/local. If you wish you can
return /usr/local to its default ownership with:
  sudo chown root:wheel /usr/local

と表示されたので、案内どおり

$ sudo chown root:wheel /usr/local

としておく。

$ brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup
Error: No available tap phinze/cask.
Untapping caskroom/cask... (3,459 files, 3.6M)
Untapped 0 formulae
Already up-to-date.
$ brew cask install docker-toolbox
==> Downloading https://github.com/docker/toolbox/releases/download/v1.12.1/DockerToolbox-1.12.1.pkg
######################################################################## 100.0%
==> Verifying checksum for Cask docker-toolbox
==> Running installer for docker-toolbox; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Docker Toolbox
==> installer: Installing at base path /
==> installer: The install was successful.
🍺  docker-toolbox was successfully installed!

docker-toolbox がインストールできた! 現時点でインストーラ版(1.12.0)よりバージョンが新しい。

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

docker-machine は無いので作る

$ docker-machine create --driver "virtualbox"

$ eval $(docker-machine env default)

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

動いた!

18
19
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
18
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?