Macにpyenvを入れたらbrew doctorで怒られるようになったので対応したメモ
Ansibleの1.9系と2.0系を両方使いたくてpyenvを導入したらHomebrewに怒られた。
$ 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 and just ignore them. 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:
/Users/tsukapah/.pyenv/shims/python-config
/Users/tsukapah/.pyenv/shims/python2-config
/Users/tsukapah/.pyenv/shims/python2.7-config
PATHが通ってるところとかHomebrew関連のディレクトリに管理外の*-config
が悪影響及ぼすかもしれないからどうにかしてねー、って感じでしょうか。
実際にPATHはこうなってた。
$ echo ${PATH}
/Users/tsukapah/.pyenv/shims:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
しっかり先頭にいる。
ファイル消すわけにもいかんしPATHをどうにかする方向で検討。
brewコマンドを使うときだけpyenv用のPATHが通らなくなればいいので、brewコマンドのalias
を以下の感じで.bash_profileの最後に設定しておけば解決。
alias brew="env PATH=${PATH/\/Users\/${USER}\/\.pyenv\/shims:/} brew"
あとはこの.bash_profileを読み込み直してあげればHomebrewの機嫌も直ってメデタシ。
Author And Source
この問題について(Macにpyenvを入れたらbrew doctorで怒られるようになったので対応したメモ), 我々は、より多くの情報をここで見つけました https://qiita.com/tsukapah/items/40462aa2311ce6269571著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .