赞
踩
有时brew版本太旧也会有问题
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- #更新Homebrew
- cd "$(brew --repo)"
- git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
-
- #更新Homebrew-core
- cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
- git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
-
- #更新Homebrew-cask(最重要的一步,很多更新完国内源依然卡就是没更新这个)
- cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
- git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
最重要
- echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/' >> ~/.zshrc
- source ~/.zshrc
- echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/' >> ~/.bash_profile
- source ~/.bash_profile
brew update -v
#或都使用下面的更新
brew update-reset
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。