Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

macos - Installing Homebrew on OS X

According to the Homebrew site, to install it, I need to type:

brew install wget

I get an error message:

-bash: brew: command not found

Found this answer. The problem, however, is I don't see brew in /usr/local/bin.

I added the below line to my .bashrc file

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

Still getting the command not found error.

How do I install Homebrew on OS X?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It's on the top of the Homebrew homepage.

From a Terminal prompt:

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

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.


Historic...

Before about 2020, the command given on the Homebrew page was:

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...