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
1
Help us understand the problem. What is going on with this article?
@miya6986

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

More than 1 year has passed since last update.

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

1
Help us understand the problem. What is going on with this article?
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
miya6986
webエンジニアを目指して学習中!

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?