When I run brew doctor, I get /user/bin occurs before /usr/local/bin So I changed my /etc/paths and my ~/.MacOSX/environment.plist as this post said to do. When I run brew doctor again, I still get the same error. Any tips? Thanks
If you change environment files, you have to tell the shell to manually read them to update the environment. Closing the terminal and reopening is one way to do it, but a more efficient way is to use the
Also, I would avoid editing any files that require sudo access, such as
/etc/paths. A safer way to edit your path would be to add the line
to the file
~/.profile (it may not exist on your computer) then run
$ source ~/.profile
to have your changes take effect. By editing your
~/.profile instead of a system file such as
/etc/paths you are safeguarding against user error. If you need to reset to the default
PATH settings at some point in the future, simply delete that line from
~/.profile. However, you will have to manually change
/etc/paths again to revert to default.
~/.profile will automatically be
sourced by Terminal.app when a new shell is opened if it exists, so you only need to do this once.