MacOS – Homebrew PATH error Mac OS X 10.6.8

homebrewmacospath

So I've found this wildly helpful blog (http://blog.wyeworks.com/) and managed to muddle my way to step 5 (after leaving ridiculous comments after getting stuck on step one)

    $ brew install memcached mysql postgresql

I've gotten the "your system is raring to brew" message. However, when I entered the string to install the rest of the libraries, I got a fatal error message and when I ran the brew doctor code again I got the error message:

Error: /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:

memcached

Consider amending your PATH so that /usr/local/bin
is ahead of /usr/bin in your PATH.

Which seems simple enough, but all of the instructions I've found online are horribly contradictory and not helpful at all. The most common advice seems to be to change the path via creating a new file (and then referencing it in terminal through various and vastly different code strings), but no where states where you create this file. I think I am going to bug people with my lack of knowledge but any help would be appreciated. Would this page help at all?? http://www.macupdate.com/app/mac/14363/plistedit-pro

I have Xcode 3.2.6, Snow Leopard 10.6.8 and I'm trying to use Homebrew (and I have run the update) and rbenv.

Simply put, I am looking for a way to edit my path, for what to edit it to, and how to get homebrew running with no errors.

Best Answer

Look in your home directory ('cd ~' to get there, 'ls -a' to look) for a .bash_profile or .bashrc file.

If you find one of them, open it up and you should see a line like this:

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

Cut the "/usr/bin:" and paste it after the "/usr/local/bin:"

If you don't find either of those files, create one called .bash_profile and put this line inside:

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