Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop homebrew from complaining about *-config files in $PATH?

Tags:

homebrew

rbenv

I get the following error message with brew doctor

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

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/.rbenv/shims/passenger-config

I think this is because of the *-config pattern that homebrew uses and because the directory of the file is in $PATH. Still I do not know how to fix this.

$PATH looks like this (I have reformatted it so its easier to see):

/Users/username/.rbenv/shims
/Users/username/.nvm/v0.9.8/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/sbin
/Users/username/bin

I have installed rbenv via brew.

like image 471
ayckoster Avatar asked Nov 22 '13 11:11

ayckoster


1 Answers

The culprit is indeed this line in HomeBrew:

https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/doctor.rb#L611

It's looking for a file that follows the convention *-config, which in this case, yours does. As already stated, it is not an error, just a warning. In order to solve the problem they would have to have a whitelist of all possibles which would not scale, so they are doing a best guess.

I have similar on my machine:

/Users/duncan/.rbenv/shims/brightbox-config
/Users/duncan/.rbenv/shims/passenger-config
like image 66
Duncan Robertson Avatar answered Oct 19 '22 20:10

Duncan Robertson