10

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.

ayckoster
  • 6,707
  • 6
  • 32
  • 45

2 Answers2

12

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
Robin Whittleton
  • 6,159
  • 4
  • 40
  • 67
Duncan Robertson
  • 596
  • 5
  • 10
  • 1
    For what it’s worth I’ve just found https://github.com/Homebrew/homebrew/issues/18552 ; looks like they’re treating this purely as a warning and are happy enough to leave it in place. – Robin Whittleton Feb 24 '14 at 13:53
-2

This is not an error message, it is a warning. brew doctor gives advice about how you could fix your system if you have problems. If you have no problems, or you know better, there is no requirement to remove all those warnings before you can move on with life. Just ignore it.

If you can produce a specific rule why and how this file should be ignored, you can file a bug with Homebrew.

Peter Eisentraut
  • 35,221
  • 12
  • 85
  • 90