Tips for asking questions

The best way to get the answers you're looking for is to learn how to best ask your question. Learn some tips on how to best format your questions in the forum.

Have technical questions?

If you're experiencing what appears to be a bug or something that doesn't seem to be working correctly, please contact support directly.

Default_avatar

brew doctor errors, Homebrew help please!

So I installed homebrew and I am getting some warnings starting out and I am trying to figure out how to fix them.

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:

/opt/sm/pkg/active/bin/curl-config
/opt/sm/pkg/active/bin/ncurses5-config
/opt/sm/pkg/active/bin/ncursesw5-config
/opt/sm/pkg/active/bin/pkg-config
/opt/sm/pkg/active/bin/xml2-config
/opt/sm/pkg/active/bin/xslt-config

Warning: You have a non-Homebrew 'pkg-config' in your PATH: /opt/sm/pkg/active/bin/pkg-config

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

Ok, so all of my google searching has told me I should remove the /opt/sm/pkg/active/bin/pkg-config from the $PATH, unfortunately no one seems to want to explain how. Any help would be very appreciated.

Thanks again

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

5 Answers

Default_avatar

Ok, so I managed to figure this one out. The hard part was figuring out where the /opt/sm/ stuff was being added to the $PATH. I managed to find it by accident while trying to uninstall RVM and hopefully start fresh.

The opt directory was in the "Macintosh HD" directory, but it did't have those scripts. The /opt/sm was in the /etc/profile.d directory. I opened it and then commented it out like the following.

PATH="${PATH}:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin"

to

#PATH="${PATH}:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin"

and then quit and relaunch Terminal the ran $brew doctor and it said I was all ready to go. I then followed the instructions here http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ to install (re-install) everything else and so far it has run pretty smooth.

If anyone has any reason on why/why not this was the right thing to do I'd be thankful.

Lates.

  • Best Answer
Default_avatar

Thanks a lot Matt! That solved my problem too.

Default_avatar

This helped me also Matt - thanks!

Default_avatar

I guess I'm more of a newbie than you guys. I was having a harder time finding the "/profile.d" folder. I had to run sudo open /etc/profile.d in the terminal.

Then upon trying to edit the sm.sh file with the new PATH given above, I was told I couldn't edit the file. I found the solution by right clicking on the "/profile.d" folder then clicking on "Get Info". Then, at the bottom of the window there is a pad lock. I had to unlock the folder and change the permissions from "Read Only" to "Read & Write".

Upon doing this i could edit the file and save it. Re-opened the terminal and ran brew doctor and it was fixed!

Thanks for the help guys. Hope this helps as well.

Default_avatar

Thanks Matt! That worked for me to!

P.S. to make my life easier, I wanted to be able to see hidden files in Finder. Type these commands into Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Switch TRUE to FALSE in order to switch back to the way it was.

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.