LoginSignup
50
53

More than 5 years have passed since last update.

Homebrewをインストールしたときに出るWarningの対処

Last updated at Posted at 2013-10-31

Homebrewのインストール後に以下のコマンドで動作確認をしたときに

$ brew doctor
Your system is raring to brew.

ではなくて大量のWarningが出たときの対処を覚えている範囲でメモ。


前段階として、MacPortsを導入したことがあれば、Homebrewと競合するのでアンインストールすること。

MacportsのアンインストールとHomebrewの導入 | abeerforyou.com


Warning: /usr/local/include isn't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew.

If a brew tries to write a header file to this directory, the install will fail during the link step.

You should probably chown /usr/local/include

/usr/local/includeに書き込み権限が与えられていない。他のパスも指摘されることがあるがその場合は全部直す。
[username]は現在ログインしているアカウント名に書き替えること。

$ sudo chown -R [username] /usr/local/include

osx - Brew doctor says: "Warning: /usr/local/include isn't writable." - Stack Overflow


Warning: You have leftover files from an older version of Xcode.
You should delete them using:
/Developer/Library/uninstall-developer-folder

古いバージョンのXcodeが残っているので一式を削除する。

$ sudo /Developer/Library/uninstall-developer-folder

homebrew updateしていなかったでござるの巻 - 東の森


Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
cd /usr/local/Library && git stash && git clean -f

よくわからないがMacPortsでインストールしたときのGitのゴミファイルが残ってるらしい。
Gitをインストールしなおしてから掃除する。

cd /usr/local/Library && git stash && git clean -f

homebrew brew doctorトラブルシューティング - bismar's blog


Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
/opt/local/sbin/

環境変数PATHの最後がスラッシュで終わっているのはおかしいと仰っている。
自動的に書き込まれたPATHを直さなくてはならない。

以下のコマンドを打って.bashrcファイルを開き

vim ~/.bashrc

書き込まれているPATHの指定の中から、最後がスラッシュになっているものを直す。
vimの編集は

  1. [ i ]で編集モード
  2. [ Esc ]で編集モードを出る
  3. [ : ][ w ][ q ][ Enter ]で上書き保存

保存したらターミナルを一旦終了し、再起動する。

MacPortsからHomebrewに乗り換えようとしてワーニング吐かれた - あいぼうのぶらぶら日記 in はてな

パス(PATH)を通す(Mac OS X 10.5) :: R-STYLES.NET

50
53
1

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
50
53