LoginSignup
10
8

More than 5 years have passed since last update.

anyenv で brew doctor すると Warning: "config" scripts exist outside your system or Homebrew directories. と言われるのを回避する

Last updated at Posted at 2016-07-21

anyenv で brew doctor すると Warning: "config" scripts exist outside your system or Homebrew directories. と言われるのを回避するメモ。

現象

$ brew doctor
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.

原因

例えば、~/.anyenv/envs/pyenv/shims/python-config とかが存在していると、 config スクリプトが管理外にあるよって怒られる。

他にも、 phpenv も入れてたりすると、それも怒られる。

回避策

  • brew を alias にして、 env にて、 PATH を上書きする
  • その際に、 ~/.anyenv/envs/pyenv/shims とか、 ~/.anyenv/envs/phpenv/shims とかを除外してやる

具体的には、~/.bash_profile とかに alias brew="env PATH=${PATH/\/Users\/YOUR_USER_NAME_HERE\/.anyenv\/envs\/*env\/shims:/} brew" を追加する。

例えばこんな感じ。

if [ -f ~/.anyenv/bin/anyenv ]; then
    export PATH="$HOME/.anyenv/bin:$PATH"
    eval "$(anyenv init -)"
    alias brew="env PATH=${PATH/\/Users\/YOUR_USER_NAME_HERE\/.anyenv\/envs\/*env\/shims:/} brew"
fi

というメモ。

10
8
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
10
8