Brew 升级及踩坑

brew安装时报错-/usr/local must be writable

 

执行语句

udo chown -R $(whoami) /usr/local,即

 

sudo chown -R username /usr/local

其中username为系统当前用户名。

然后执行brew update

使用中科大的镜像
替换默认源
第一步,替换brew.git

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

第二步:替换homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

最后使用

  brew update

进行更新,发现速度变的很快。替换镜像完成。



posted @ 2019-04-03 09:18  林台山人  阅读(59)  评论(0)    收藏  举报