過去 El Capitan
にbrew install
で
上記文書の
この
前提
以下の
* OS
% sw_vers ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G29
brew/Troubleshooting.md に ついて
よくある
基本的に
formula
に紐づく 問題であれば、 brew gist-logs <formula >
コマンドで、問題を 報告。 formula
に紐づく 問題でなければ、 brew config
と、brew doctor
のアウトプットを 取得し、 Gist を 作成する。
とあります。
[1]formula
は
homebrew が
Check for common issues
の 手順を 踏む
以下、Check for common issues
の
brew update
を 2回実行
Run brew update twice.
何故2回なのか
1度目
% brew update Updated 3 taps (caskroom/cask, homebrew/core, homebrew/science). ==> New Formulae .... ==> Updated Formulae .... ==> Renamed Formulae .... ==> Deleted Formulae ....
Formulae
の2度目
% brew update Updated 1 tap (homebrew/core). ==> Updated Formulae ....
3度目
% brew update Already up-to-date.
brew doctor を 実行し 警告に 対処する。
Run brew doctor and fix all the warnings
brew doctor を
brew docorの 実行
% brew doctor Warning: Your XQuartz (2.7.8) is outdated. ... Warning: Unbrewed header files were found in /usr/local/include. ... Warning: You have unlinked kegs in your Cellar ... Warning: Some directories in your path end in a slash. ... Warning: Broken symlinks were found. Remove them with `brew prune`: ... Warning: Some installed formula are missing dependencies. ... Warning: Some keg-only formula are linked into the Cellar. ...
警告への 対処
出力された
Warning: Your XQuartz (2.7.8) is outdated.
MacにHomebrewを インストールする 手順と Warningの 解決方法 - Qiita に 記載が あります。
XQuartz の最新版を インストールすると 解消されます。
brew cask reinstall でxquartz を 指定します。 Warning がbrew cask reinstall xquartz Warning: /usr/local is not writable, sudo is needed to move the Caskroom.
出力されますが、 気にせず sudo して 進めます。 🍺 xquartz was successfully installed!
インストールに 成功しました。 Warning: Unbrewed header files were found in /usr/local/include.
[macOS] OS X Yosemite へ update 後のbrew doctor で エラーが 出たので 直す | deadwood に 記載が あります。
対象のinclude ファイルを 削除します。 rm -f /usr/local/include/python3.4m/greenlet/greenlet.h
Warning: You have unlinked kegs in your Cellar
コマンドラインでbrew doctorすると 警告だらけに なっちゃった 助けて - Qiita に 記載が あります。
メッセージの通りですが、 brew link <formula >
すると解消します。
私の環境の 場合は、 出力されている ものは 無視しても 構わない 勝手知ったる ものだったので、 無視しました。 Warning: Some directories in your path end in a slash.
パスが/
で終わるのは あまりよくないらしく、 path 通していた 対象記述の 末尾の /
を除去しました。 Warning: Broken symlinks were found. Remove them with
brew prune
:
Homebrewのアップデート時に 出た5つの Warningと 解決方法 - Qiitaに 記載が あります。
brew prune
を実行します。 記事とbrew prune Error: Permission denied -...
同様に パーミッションが なく エラーと なったため、 ログインユーザーに 権限を 付与し、 再度コマンドを 実行、 解消しました。 Warning: Some installed formula are missing dependencies.
homebrew brew doctorトラブルシューティング - bismar’s blogに記載が あります。
警告表示されているコマンドを 実行します。 brew install fontconfig gd gmp@4 isl@0.12 jpeg libtiff libtool webp
Warning: Some keg-only formula are linked into the Cellar.
Warning: You have unlinked kegs in your Cellar
に対応する ライブラリで 警告が 出ていましたので、 無視しました。
CLT と Xcode が 最新版である ことを 確認する
brew doctor
で
警告が
パーミッションエラーが 出た 場合は 適切な 権限に 修正する
こちらは、
brew/Common-Issues.md at master · Homebrew/brewを 確認する
https://github.com/Homebrew/brew/blob/master/docs/Common-Issues.mdを
MAC OS を
試しに
% xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
意味は
brew upgrade
だけを% brew upgrade ==> Auto-updated Homebrew! Updated 1 tap (homebrew/science). ==> Updated Formulae homebrew/science/prodigal homebrew/science/sga ==> Upgrading 26 outdated packages, with result: clasp 3.3.2, cloog 0.18.4_1, doxygen 1.8.13_1, elasticsearch 5.5.2, gauge 0.9.1, git 2.14.1, gradle 4.1, graphviz 2.40.1, infer 0.12.0_1, libyaml 0.1.7, logstash 5.5.2, maven 3.5.0, mongodb 3.4.7, nmap 7.60, node 8.4.0, pandoc 1.19.2.1, pkg-config 0.29.2, postgresql 9.6.4, postgresql@9.5 9.5.8, pyenv 1.1.3, python3 3.6.2, redpen 1.9.0, sonar-scanner 3.0.3.778, sqlite 3.20.1, xz 5.2.3, zeromq 4.2.2
[2]
postgresql
あたりでbrew update
を 2回実行を 再度実行
upgrade後の
1度目
% brew update brew update Updated 2 taps (homebrew/core, homebrew/science). ==> Updated Formulae ......
2度目
% brew update brew update Already up-to-date.
brew docorの 実行
% brew doctor Warning: You have unlinked kegs in your Cellar .... Warning: Some keg-only formula are linked into the Cellar.
brew doctor は
まとめ
以下まとめます。
brew update
を2回実行 した ほうが よい
完全に最新化されるのに 2回かかると いう 挙動に なりました。 2回実行するべきです。 brew doctor
の警告は 勝手知ったる ものならば、 見送る インストールの 都合上警告が 上がる ケースは 見送っても 問題は ないと 思います。 brew upgrade
するなら、最初に 実行して おいた ほうが いい
2度手間になるので、 brew upgrade
するなら、brew update
の前に 実行した ほうが いいかと 思います。 面倒くさい
時間もかかる上に、 面倒くさいです。 brew doctor
の削除コマンドとか 自動生成してくれる ツールが あるとうれしいかもしれません。
面倒く
コメント