ふとbrew update
を行った際に、セットでbrew doctor
を行ったところwarning発生
なんだか気になる
brew doctorで発生したwarning
% brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Users/username/.anyenv/envs/phpenv/shims/php-config
anyenv経由でphpenvをインストールしていたため、この時に作成されたconfigファイルはHomebrewでの管理外。
その状態で*-configなファイルがあるとhomebrewの./configureとごっちゃになって設定ファイルを上書きしてしまう可能性があるよう。
エイリアスを追加
% vim ~/.zshrc
alias brew="env PATH=${PATH//Users/username/.anyenv/envs/phpenv/shims:} brew"
usernameは自分のユーザー名に変更してください。
書き込んだらターミナル再起動
解決
% brew doctor
Your system is ready to brew.
参考1: phpenv入れてる時brew doctorしたら出るWarning消した
参考2: HomebrewでdoctorしたらWarning: "config" scripts exist outside your system or Homebrew directories.となった時の対応方法
参考3: 【Homebrew】brew doctorのWarning対処方法 (その3) + envコマンドについて
Comments