01_Mac下安装homebrew

参考:https://jingyan.baidu.com/album/fec7a1e5ec30341190b4e7e5.html?picindex=3

  

1.在打开的命令行工具中输入如下语句:

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

2.输入root密码后会开始下载homebrew,如果此时网速不稳定可能会出现错误提示:curl: (35) Server aborted the SSL handshake。

此时需要执行卸载操作,输入如下命令进行卸载:

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

卸载完成后再次尝试安装。

安装成功后出现:

-bash: brew: command not found

解决方法:参考http://blog.csdn.net/li396864285/article/details/52572163

1.sudo vim .bash_profile

2.添加 export PATH=/usr/local/bin:$PATH

3.保存退出后,生效配置即可,source .bash_profile

再次输入brew就已经成功

原文地址:https://www.cnblogs.com/HigginCui/p/6950316.html