pyenvをインストールしている時にbrew doctorで出るのWARNINGを消す方法
brew doctorをターミナルで実行すると以下のようなエラーが出る時の対処法
$ 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 what 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: /usr/local/var/pyenv/shims/python3.7-config /usr/local/var/pyenv/shims/python3.7m-config /usr/local/var/pyenv/shims/python-config /usr/local/var/pyenv/shims/python3-config
configファイルをhomebrewが管理していなくてちょっと怖いぜって感じの警告だそうです。 brewコマンドのエイリアスを設定してやることで解決できます。
対処
対処方法としては、.bash_profileに以下を追記します。
alias brew="PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin brew"
参考にしたサイト
【Homebrew】brew doctorのWarning対処方法 (その3) + envコマンドについて - TASK NOTES