Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
19
Help us understand the problem. What is going on with this article?
@ytyng

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

More than 3 years have passed since last update.

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.

動いた!

19
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ytyng
torico
マンガに関わるWEBサービスを軸に、面白いと思えることを企画・開発している会社です。オタク文化が好きな人は是非一緒に働きましょう! Python3 / Vue.js(TypeScript) / Flutterで開発中!

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
19
Help us understand the problem. What is going on with this article?