按
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
指令安装时提示github无法访问,下载不了brew。
所以只能
git clone git://mirrors.tuna.tsinghua.edu.cn/homebrew.git 或(git clone http://mirrors.ustc.edu.cn/homebrew.git)
下载,然后拷入/usr/local文件夹
在尝试
git remote set-url origin http://mirrors.ustc.edu.cn/homebrew.git
后,
进行 brew update时,仍然提示无法访问 github,很是怪异。
想到办法有两种,一种是去修改 brew 的脚本强行指定,但太麻烦了。
所以最终还是用shadowsocksx-ng,直接通过连上服务器,开1087端口作为http代理,并在终端中使用:
export https_proxy=http://127.0.0.1:1087
然后brew成功。
Leave a Reply