一、问题原因是更新源:
1、默认源:https://github.com/Homebrew/homebrew.git
2、替换为国内源:
(1)中科大brew镜像源 http://mirrors.ustc.edu.cn/homebrew.git
(2)清华brew镜像源 http://mirrors.ustc.edu.cn/homebrew.git
二、操作步骤:
1、替换 brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
2、替换 homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
本文详细介绍了在Mac环境下,如何将Homebrew的默认源更改为中科大或清华大学提供的国内镜像源,以提高软件包的下载速度。具体操作包括替换brew.git和homebrew-core.git的源地址。

1614

被折叠的 条评论
为什么被折叠?



