首先参考官网安装
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
先在浏览器输入这个地址:
https://raw.githubusercontent.com/Homebrew/install/master/install
看是否能打开,不能打开就是你网络有问题,不要问我哦。
能打开如下:
把这个网页保存名为brew_install.rb的文件,保存的位置你随便,只要自己能找到。
则在终端输入curl
$ curl
curl: try 'curl --help' or 'curl --manual' for more information
这样就没错,要是报错,那我就不知道了!
然后在终端进入存放这个文件的目录(这个不用我教吧),然后终端输入
ruby brew_install.rb
然后等安装homebrew吧!
作者:kangxx
链接:https://www.jianshu.com/p/68efabd2e32b
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
I, too, just had this problem start all of a sudden within the past few days. It's definitely not Homebrew as mentioned above; I ended up doing
git config --global --unset http.proxy
git config --global --unset https.proxy
and then restarting my term session and it works again
Try to sudo chown -R $USER:admin /usr/local/*
- 报错 sudo chown -R $USER:admin /usr/local/bin/brew illegal user name