参考:https://jingyan.baidu.com/album/fec7a1e5ec30341190b4e7e5.html?picindex=3html
1.在打开的命令行工具中输入以下语句:git
ruby -e "$(curl --insecure -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"github
2.输入root密码后会开始下载homebrew,若是此时网速不稳定可能会出现错误提示:curl: (35) Server aborted the SSL handshake。vim
此时须要执行卸载操做,输入以下命令进行卸载:ruby
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"bash
卸载完成后再次尝试安装。curl
安装成功后出现:工具
-bash: brew: command not foundurl
解决方法:参考http://blog.csdn.net/li396864285/article/details/52572163.net
1.sudo vim .bash_profile
2.添加 export PATH=/usr/local/bin:$PATH
3.保存退出后,生效配置便可,source .bash_profile
再次输入brew就已经成功