Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

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

というメモ。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away