Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I run brew doctor I get this warning:

Warning: /usr/bin occurs before /usr/local/bin

TONS of people with the same problem, but they solve it by running this:

PATH="/usr/local/bin:$PATH"

Which fixes it once, but upon closing the terminal windows and opening a new one and running brew doctor, the warning re-appears.

Is there a permanent fix for this?

share|improve this question
add comment

1 Answer

Edit your PATH variable in your ~/.profile (assuming you have not changed your default login shell). There should be something like this:

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

change it so that /usr/local/bin in before /usr/bin.

If you do not have a ~/.profile (or it is empty) type the following:

echo 'export PATH=$PATH' >> ~/.profile,

Make certain that you use >> instead of one >.

Now edit the ~/.profile like described before.

share|improve this answer
    
My .profile file is empty upon entering sudo nano ~/.profile –  Jackson Gariety Dec 4 '12 at 7:16
    
added more information @JacksonGariety –  Pfitz Dec 4 '12 at 7:26
    
Thanks! So my .profile now looks like this and it's saved: export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin But it gives me the same error. Is a restart needed here? –  Jackson Gariety Dec 4 '12 at 7:30
    
close and reopen the Teminal –  Pfitz Dec 4 '12 at 7:35
1  
It could be in either ~/.profile, ~/.bash_profile, ~/.bash_login, or ~/.bashrc already. –  Jason Salaz Dec 4 '12 at 8:56
show 4 more comments

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.