赞
踩
在国内,使用brew极慢. 因为它需要访问国外的一些服务器.
解决方法是使用国内的镜像站.
curl https://raw.githubusercontent.com/Homebrew/install/master/install.sh > install-brew.sh
然后,在下载的文件中, 修改BREW_REPO为:
BREW_REPO="https://mirrors.ustc.edu.cn/brew.git"
最后, 运行:
HOMEBREW_CORE_GIT_REMOTE=https://mirrors.ustc.edu.cn/homebrew-core.git bash install-brew.sh
- cd "$(brew --repo)"
- git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
-
- echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
- source ~/.bash_profile
-
- cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
- git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
替换后, 就可以正常使用brew了.
参考这篇文章 ==》 Mac解决brew慢的问题,添加国内源
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。