w-zzpa
Last Updated: June 14, 2016
·
6.648K
· linjunpop
Img 1222

Fix OS X Mavericks homebrew $PATH issue

Fix OS X Mavericks homebrew $PATH issue: /usr/bin occurs before /usr/local/bin

Edit /etc/paths

/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin
Say Thanks
Respond

2 Responses
Add your response

10544
48d74e69c570096b6d40ea72b9fcf921 normal

Awesome! Worked for me. I was scouring everywhere in the dotfiles in my home directory and couldn't figure out where that was coming from. Is this /etc/paths file new in Mavericks?

over 1 year ago ·
13742
C65cf885a9513ae830feb8656d993e5c

/etc/paths is for all users on the system. Editing it may not be desirable for that reason. You can always modify your own path, for example in "sh" type shells (sh, bash, zsh) you put the following line in the appropriate file in your home directory (.profile, .bash_profile, .zshrc):

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

This puts /usr/local/bin before the paths in /etc/paths in the search list, and exports the path to a new shell if you spawn one.

over 1 year ago ·
Filed Under