shou.com
JP / EN

Homebrewのインストール方法

Fri Jul 28, 2017
Fri Jul 28, 2017

Homebrewのインストール

まず、AppStoreからXcodeをダウンロードします。

次にターミナルに移動して、下のコマンドを実行してください。

1
xcode-select --install

インストール画面が表示されると思いますので、そのままインストールを行ってください。

次にHomebrewのインストールですが、これはMacOSが違うとコマンドが違うので気をつけましょう。

Sierraの場合

1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Sierra以外

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

コマンドを実行するとパスワードが求められます。その時は、現在お使いのMac端末のログイン・パスワードを入力します。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
$ ruby -e "$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/intall)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
==> The following directories will be made group writable:
/usr/local/.
/usr/local/bin
==> The following directories will have their owner set to boku:
/usr/local/.
/usr/local/bin
==> The following directories will have their group set to admin:
/usr/local/.
/usr/local/bin

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin
Password:

以上で終わりです。試しにターミナルでbrew -vと打ってみましょう。うまくいってれば下のように表示されます。

1
2
3
$ brew -v
Homebrew 1.2.4
Homebrew/homebrew-core (git revision 3137; last commit 2017-07-21)