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

简介: 运行命令brew install pip3,结果界面一直卡在Updating Homebrew...上,有两种解决办法方法一:直接关闭brew每次执行命令时的自动更新(推荐)vim ~/.

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

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

vim ~/.bash_profile

# 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true

方法二:替换brew源

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
目录
相关文章
|
Python
Windows7 设置pip 镜像 Pip Warning:–trusted-host 问题解决方案
最近写了一篇关于“微软开源分布式高性能GB框架LightGBM安装使用”的文章,有小伙伴安装Python环境遇到了问题。我个人也尝试安装了一下,确实遇到了很多问题。这不又遇到;设置pip 镜像 Pip Warning:–trusted-host 问题。
3017 0
|
2月前
Mac Brew install慢的问题
Mac Brew install慢的问题
29 1
|
Docker 容器
尝试添加 --skip-broken 来跳过无法安装的软件包 或 --nobest 来不只使用最佳选择的软件包
尝试添加 --skip-broken 来跳过无法安装的软件包 或 --nobest 来不只使用最佳选择的软件包
1378 0
尝试添加 --skip-broken 来跳过无法安装的软件包 或 --nobest 来不只使用最佳选择的软件包
|
3月前
|
数据安全/隐私保护
|
11月前
Mac解决Updating Homebrew卡顿
Mac解决Updating Homebrew卡顿
260 0
|
Shell iOS开发 MacOS
Homebrew brew update 长时间没反应(或卡在 Updating Homebrew...)
Homebrew brew update 长时间没反应(或卡在 Updating Homebrew...)
1723 0
Mac brew 卡在 ‘Cloning into ‘.../homebrew-core(或 homebrew-cas)‘
Mac brew 卡在 ‘Cloning into ‘.../homebrew-core(或 homebrew-cas)‘
183 0
|
SQL NoSQL 数据挖掘
macOS 11.5 brew install redis错误解决方法
macOS 11.5 brew install redis错误解决方法
348 0
macOS 11.5 brew install redis错误解决方法
|
网络协议
macbook中安装Homebrew 出现443错误
macbook中安装Homebrew 出现443错误
888 0
|
缓存 API Android开发
Installation did not succeed。apk安装失败的一些解决办法
Installation did not succeed。apk安装失败的一些解决办法
742 0
Installation did not succeed。apk安装失败的一些解决办法