0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

brew doctorで出たエラー”Warning: "config" scripts exist ~~~”を解決したい

Posted at

概要

Homebrewの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.
Warning: Unbrewed dylibs were found in /usr/local/lib.
Warning: Unbrewed header files were found in /usr/local/include.
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
....

  • Warning:unbrewedは,「homebrewの管理下ではないファイルがあるから,消してね」という意味.無視してもあまり影響はないらしい.確認したところ,消したら色々問題が出そうなファイルばかりなので,ひとまず放置しておく.
  • Warning: "config"・・・は,「Homebrewの管理してないconfigファイルがあるよ.大丈夫?」という意味.トラブルの原因になりそうなので,なんとかする.
    • 問題になったパスは/anaconda3/bin/(ファイル名)
    • 実際に$ echo ${PATH}でパスを確認したら,「/anaconda3/bin:/」が先頭にいた.

手順

1. $ vi ~/.bash_profile で,bashの設定ファイルである.bash_profileを編集可能にする.
※bashの起動時に読み込むのが「.bash_profile」で,画面生成時に読み込むのが「.bashrc」だそうで,自分は「.bash_profile」を使うことにしている.
2. .bash_profileに次の文を挿入.

alias brew="env PATH=${PATH/\/anaconda3\/bin:/} brew"

※viの編集方法を忘れた場合は,viの基本的な使い方を参照.

3. .bash_profileを保存する.
4. ターミナルを再起動後$ brew doctorして,問題の解決を確認
$ source ~/.bash_profileでは,設定が反映されなかった.なぜだろう...

参考資料

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?