cd /usr/local
//清华镜像源
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew.git
//中科大镜像源
git remote set-url origin http://mirrors.ustc.edu.cn/homebrew.git
//coding.net
git remote
jlive@MacBook-Pro:~ $brew install screenfetch
==> Downloading https://homebrew.bintray.com/bottles/screenfetch-3.7.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring screenfetch-3.7.0.el_capitan.bottle.tar.gz
????
jlive@MacBook-Pro:~
$screenfetch
2.代理
brew下载包默认使用curl,所以针对curl做代理即可
cat > ~/.curlrc
proxy = 127.0.0.1:1087
EOF
问题:
1.High Sierra中chown: /usr/local: Operation not permitted
https://github.com/Homebrew/brew/issues/3228
解决方案:
sudo chown -R $(whoami) $(brew --prefix)/*
如果还未解决,可以尝试重新安装homebrew,我的情况是重新安装homebrew后解决的