Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sure this is not a new question, and have ben answered on this website before. I have tried the solutions prescribed but unfortunately the error is still persisting. Hence, approaching the community again.

The problem is that HomeBrew gives the warning as follows:

Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths:


Consider amending your PATH so that /usr/local/bin occurs before /usr/bin in your PATH.

My /etc/paths looks like this:


My ~/.bash_profile looks like this:

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

My ~/.bashrc looks like this:

export PATH=/usr/local/bin:/usr/local/sbin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

My echo $PATH output looks like this:

/usr/local/rvm/gems/ruby-1.9.3-p194/bin /usr/local/rvm/gems/ruby-1.9.3-p194@global/bin    /usr/local/rvm/rubies/ruby-1.9.3-p194/bin /usr/local/rvm/bin /usr/bin /bin /usr/sbin /sbin     /usr/local/bin /opt/sm/bin /opt/sm/pkg/active/bin /opt/sm/pkg/active/sbin /opt/local/bin 
share|improve this question

migrated from Dec 23 '12 at 15:19

This question came from our site for professional and enthusiast programmers.

IIRC, the paths are actually some kind of weird queue. Try putting /usr/local/bin AFTER /usr/bin in your paths file. This may be completely wrong, but something from my teens is triggering my spidey sense. – L0j1k Dec 23 '12 at 11:47
Do you really get all the spaces in your output for echo $PATH? Or is it just a formatting error? in which shell are you outputting your PATH? bash? – Thomas Krajacic Dec 23 '12 at 12:36
I have the same issue. The only thing I can imagine is mangling my $PATH is this rvm script. I need /usr/local/bin before '/usr/bin' – Harry Moreno Apr 8 '14 at 23:10
What happen if you remove all the exports and just leave the one in /etc/paths? – Ammar Alammar Oct 4 '14 at 3:55

You must log in to answer this question.