Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've just installed Homebrew onto my machine, after which I ran brew doctor which threw up two warnings.

I didn't appear to have the command line tools for Xcode installed, which I have now. The second warning is:

Warning: You have a non-Homebrew 'pkg-config' in your PATH:

`./configure` may have problems finding brew-installed packages using
this other pkg-config.

What can I do to remedy this?

share|improve this question
Where does /opt/sm, or the pkg-config come from? Do you have any other package manager installed perhaps (I'm not familiar with those, just Homebrew)? Do you remember installing it there? –  slhck Nov 28 '12 at 21:04
no idea, its a brand new machine, i decided to add all the programs on by hand instead of from a backup to get rid of all the stuff i didnt need –  sam Nov 28 '12 at 21:12
the only thing i could think of is it may have came bundeled with either osx, xcode, xcode command line tools, or when i installed rails from railsinstaller.org –  sam Nov 28 '12 at 21:14
It's the Rails installer that put itself in /opt/sm/, including the pkg-config installation, which now takes precendence over the default pkg-config from Homebrew in /usr/local/bin. Do you see any modifications the Rails installer might have made to ~/.bash_profile, ~/.profile, /etc/paths.d/, etc. to modify the path? –  slhck Nov 28 '12 at 21:25
sorry slhck, were should i be look for those ? –  sam Nov 28 '12 at 21:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.