Mac brew一直卡在Updating Homebrew
作者:
懒人程序猿 | 来源:发表于
2020-04-20 15:32 被阅读0次
方法一
vim ~/.bash_profile
# 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true
#要让刚才的修改马上生效,需要在用户目录下执行以下代码
source .bash_profile
#也可任意位置执行,生效
source ~/.bash_profile
方法二 替换brew源
阿里云
# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 刷新源
brew update
清华
# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# 刷新源
brew update
本文标题:Mac brew一直卡在Updating Homebrew
本文链接:https://www.haomeiwen.com/subject/isjdihtx.html
网友评论