LoginSignup
30
25

More than 5 years have passed since last update.

MacにHomebrewをインストールする手順とWarningの解決方法

Last updated at Posted at 2016-03-17

MacにJenkins入れるのに「Homebrew」使うのが良いらしいってことでインストールした。
インストール手順とWarningの解決方法のメモ。

2016/10/03 追記:Homebrewのアップデート時に別のWarningが出たのでメモしておきました。
Homebrewのアップデート時に出た5つのWarningと解決方法 - Qiita

環境

MacBook Pro (Retina, 13-inch、Early 2015)
OS X Yosemite バージョン10.10.5
Xcode Version 7.2.1 (7C1002)
※Command Line Toolsはインストール済み

Homebrewをインストールする

ターミナルでコマンド実行

ターミナルを開いてHomebrew公式サイトに書かれているコマンドを実行する

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

画面の指示に従ってキーやパスワード入力して、しばらく待つとインストールが終わる。
スクリーンショット 2016-03-17 19.46.59.png

インストールできたか確認

以下コマンドでHomebrewがインストールできたか確認する。

$ brew doctor

ターミナルに

Your system is ready to brew.

と表示されれば完了。

スクリーンショット 2016-03-17 19.47.51.png

環境によってWarningはありまぁす!

Warningの解決

コマンドラインツールのアップデート

ひとつめのWarningメッセージ。

Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.

App Storeからコマンドラインツールをアップデートして解決。

XQuartzのアップデート

ふたつめのWarningメッセージ。

Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.8:
  https://xquartz.macosforge.org

XQuartzが古い。公式サイトから最新版をインストールしよう。

スクリーンショット 2016-03-17 20.01.53.png
スクリーンショット 2016-03-17 20.10.11.png
ヨッシャ

$ brew doctor

するで〜

スクリーンショット 2016-03-17 20.00.09.png

ターミナルで新しいタブ開かないと認識してくれなかった(´・_・`)

スクリーンショット 2016-03-17 20.11.51.png
これでWarningは解決。無事にHomebrewが使えるようになりました。

インストール環境によっては別のErrorやWarningが出るかもだけど、基本的には表示されるメッセージどおりに対応すれば大丈夫かと。

バージョンの確認

$ brew -v

でバージョン確認できる。

スクリーンショット 2016-03-17 20.12.21.png

おわり。

30
25
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
30
25