Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Installing Homebrew - Brew Command Not Found [duplicate]

I've spent the bulk of my Friday trying to get the latest version of Ruby installed on my new MacBook Air (w/ Mountain Lion installed).

I have all the latest versions of XCode and command line tools. But I can't seem to get Homebrew to work! Here's a screenshot of where I keep getting stuck (I'm a new user, so can't embed this image).

As you can see I used the following to instal Homebrew:

ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go/install)" 

While there was a "warning" it seemed as though the installation worked:

Warning: /usr/local/bin is not in your PATH. ==> Installation successful! 

Despite that, when I try to run "brew doctor" I received the following:

-bash: brew: command not found 

Again, I'm trying to install homebrew, so i can instal the latest version of ruby -- I'm looking to learn to code in ruby, but kind of screwed if I can even get a development environment running! :)

like image 632
RossPW Avatar asked Jan 12 '13 00:01

RossPW


2 Answers

The warning is telling you what is wrong. The problem is that brew is kept in /usr/local/bin

So, you can try /usr/local/bin/brew doctor

To fix it permanently alter your bash profile (.bashrc or .profile in your home directory) and add the following line:

export PATH=/usr/local/bin:$PATH 
like image 181
Daniel Evans Avatar answered Sep 24 '22 23:09

Daniel Evans


Check XCode is installed or not.

gcc --version ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update 

http://techsharehub.blogspot.com/2013/08/brew-command-not-found.html "click here for exact instruction updates"

like image 22
Viji Avatar answered Sep 22 '22 23:09

Viji