How to install Homebrew on OS X?

dwstein picture dwstein · Dec 4, 2013 · Viewed 382.6k times · Source

I'm trying to install Homebrew on OS X.

According to the Homebrew site I should type

brew install wget

and all I get is

-bash: brew: command not found

So I've searched StackOverflow and found this answer. The problem, however, is I don't see brew in /usr/local/bin.

So, I also added the following line to my .bashrc file

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

But I'm still getting the command not found error.

How do I get Homebrew installed on OS X?

Answer

Jay Harris picture Jay Harris · Dec 4, 2013

It's on the top of the Homebrew homepage.

From a Terminal prompt:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The command brew install wget is an example of how to use Homebrew to install another application (in this case, wget) after brew is already installed.

Edit:

Above command to install the Brew is migrated to:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"