码迷,mamicode.com
首页 > 系统相关 > 详细

解决Mac os 安装软件一直卡在 Updating Homebrew

时间:2019-12-28 23:05:08      阅读:451      评论:0      收藏:0      [点我收藏+]

标签:http   https   官方   ati   origin   ror   更新   epo   tin   

Mac os 安装软件时卡在 Updating Homebrew 的解决办法

 

方法一:禁用安装软件时更新homebrew

vim ~/.bash_profile

# 增加如下一行
export HOMEBREW_NO_AUTO_UPDATE=true

 

方法二:更换 homebrew 源

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


# 备用地址1
cd "$(brew --repo)"
git remote set-url origin https://git.coding.net/homebrew/homebrew.git
brew update


# 备用地址2
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew-core.git
brew update

如果备用地址还是不行,换回官方源

#重置 brew.git
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

#重置 homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git

 

解决Mac os 安装软件一直卡在 Updating Homebrew

标签:http   https   官方   ati   origin   ror   更新   epo   tin   

原文地址:https://www.cnblogs.com/82nlf-xlqb/p/12113080.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!