Mac安装Homebrew
Homebrew官网
官网首页如下图:
![](http://upload-images.jianshu.io/upload_images/153571-6f5fbd86ce40db6c.png?imageMogr2/auto-orient/strip|imageView2/2/w/965/format/webp)
Homebrew官网首页.png
打开Mac的terminal,输入图中的命令,并点击回车,如下:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
![](https://img2018.cnblogs.com/i-beta/1482937/201912/1482937-20191205160042393-1428765141.png)
终端输入命令.png
根据terminal的提示进行操作,点击回车并输入电脑密码,如下图
![](https://img2018.cnblogs.com/i-beta/1482937/201912/1482937-20191205160125974-1828520107.png)
![](http://upload-images.jianshu.io/upload_images/153571-80e6e41fb1fd4982.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
点击回车,并输入电脑密码.png
最后静静的等待Homebrew的安装就可以了。安装成功后会提示==>Installation successful! 如下图
![](https://img2018.cnblogs.com/i-beta/1482937/201912/1482937-20191205160148943-1076774336.png)
![](http://upload-images.jianshu.io/upload_images/153571-54582215c75cbf9c.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
安装成功.png
输入 brew help 可以查看Homebrew的命令,如图
![](https://img2018.cnblogs.com/i-beta/1482937/201912/1482937-20191205160216374-503230100.png)
![](http://upload-images.jianshu.io/upload_images/153571-7e4e8ba53470ddd7.png?imageMogr2/auto-orient/strip|imageView2/2/w/1200/format/webp)
brew help.png
Homebrew安装成功后,会在Mac下自动创建目录 /usr/local/Cellar 来存放Homebrew安装的程序。 这时我们在terminal下面就可以使用 brew 的命令了。
转自链接:https://www.jianshu.com/p/89083fe3b1bf