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.

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.

share|improve this question

migrated from stackoverflow.com Jun 6 '12 at 20:50

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

1 Answer 1

up vote 2 down vote accepted

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
share|improve this answer
    
Thank you so much for your answer- but where do I look in my home directory or type cd ~ or Is -a ? I tried typing those into Terminal and they didn't do anything... And where would I go about creating a new path file? which program? –  Kat Harvey Jun 6 '12 at 3:08
    
hmm, the 'cd ~' and 'ls -a' should be typed into the terminal. The 'cd ~' changes the current directory to your home directory, and the 'ls -a' should list all the files in your current directory. –  MattL Jun 6 '12 at 3:16
    
try typing this into your terminal: 'nano ~/.bash_profile'. That should open up the .bash_profile file in a text editor, whether or not it is empty. You can save and exit the text editor by hitting control-x, then hit 'y', then hit 'enter'. –  MattL Jun 6 '12 at 3:19
    
The 'nano ~/.bash_profile' opened up the editor, and I entered 'export PATH=/usr/local/bin:$PATH', saved as .bash_profile and when I use the nano command it comes back up, but I typed .bash_profile and it returned : -bash: ./.bash_profile: Permission denied Did I miss a step? –  Kat Harvey Jun 6 '12 at 3:30
    
Once you have saved your .bash_profile file, which it sounds like you did, quit Terminal and restart it again. Then go ahead and try your brew install memcached mysql postgresql. The PATH variable tells your Terminal where to find its commands. Every time you start your Terminal it looks in your .bash_profile for your PATH. –  MattL Jun 6 '12 at 3:46

Your Answer

 
discard

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