LoginSignup
6
5

More than 1 year has passed since last update.

brew doctor

Last updated at Posted at 2020-08-20

$brew doctorしたらWarningが出たお話

何となく$brew doctorしたら Warning が3つ出てしまい、一つ一つ解決していくことになった。

一つ目の Warning

ターミナル
Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so:
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

これは簡単に解決できた。

ターミナルに書いてある通り

$ echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

$ source ~/.zshrc

をターミナルに打ち込むだけ。

2つ目の Warning

ターミナル
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python@3.8

python@3.8 にリンクされていないという警告なので、リンクさせるコマンドを打つ。

$ brew link python@3.8

3つ目の Warning

ターミナル
Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

コマンドラインツールを一度削除して、再度インストールした。

$ sudo rm -rf /Library/Developer/CommandLineTools

一度コマンドラインツールを削除する。

$ xcode-select --install

再度インストール。

ターミナル
$ brew doctor 

Your system is ready to brew.




追記

久々に $ brew doctor したら Warning 2個出たので解決法を追記する。
ターミナル
Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  php@7.2

非推奨または無効だと言っているので、削除する。

$ brew uninstal php@7.2


ターミナル
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libTMAESCrypt.a

これはよく分からなかったけど、調べたらスタティックライブラリの不整合ということらしい。

参考記事

警告文に削除する必要があるかも、って書いてあるので削除する。

$ rm -rf /usr/local/lib/libTMAESCrypt.a



参考記事

brew doctorでのWarningを解決してみた(for Mac)

HomebrewでdoctorしたらWarning: You have unlinked kegs in your Cellarとなった時の対応方法

Homebrew 2.3.0 のアップデート時、Mac のCommand Line Tools をアップデート

6
5
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
6
5