前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >brew一直卡在Updating Homebrew的解决办法

brew一直卡在Updating Homebrew的解决办法

作者头像
马哥Python
发布2019-07-23 17:21:33
2.2K0
发布2019-07-23 17:21:33
举报
文章被收录于专栏:快乐学Python快乐学Python

运行命令brew install pip3,结果界面一直卡在Updating Homebrew...上,有两种解决办法

方法一:直接关闭brew每次执行命令时的自动更新(推荐)

代码语言:javascript
复制
vim ~/.bash_profile

# 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true

方法二:替换brew源

代码语言:javascript
复制
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

如果备用地址都不行,那就只能再换回官方地址了

代码语言:javascript
复制
#重置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
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019.07.22 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档