Help us understand the problem. What is going on with this article?

brew doctorでWarning: "config" scripts exist outside your system or Homebrew directories.が出る時の対処法

ふと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コマンドについて

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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした