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?
Here is a version that wraps the homebrew installer in a bash function that can be run from your deployment scripts:
And another function which will install a homebrew formula if it is not already installed:
Once you have these functions defined you can use them as follows in your bash script:
Here's the script:
add the following in your terminal and click enter then follow the instruction in the terminal.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After I had tried everything described, I looked up into the folder permission of brew in /usr/local/etc/. Somehow the permission were changed and I was not able to open the folder. I changed the folder permissions(with chmod) with same permissions as the other folders and brew start working.
It's on the top of the Homebrew homepage.
From a Terminal prompt:
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.Following command doesn't work if your are under proxy.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Instead user following -
Note we have to use %5c instead of "\" Similarly if your password has any special character replace it with unicode e.g for @ use %40 Refer this Unicodes
Replace above command with your own params
DOMAIN - Your Domain
USER_NAME - Your User Name
PASSWORD - password
PROXY - 10.10.10.10
PORT - 8080