第一步,获取install文件
把官网给的脚本拿下来
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
第二步,更改脚本中的资源链接,替换成清华大学的镜像
就是把这两句
BREW_REPO = “https://github.com/Homebrew/brew“.freeze
CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core“.freeze
更改为这两句
BREW_REPO = “https://mirrors.ustc.edu.cn/brew.git”.freeze
CORE_TAP_REPO = “https://mirrors.ustc.edu.cn/homebrew-core.git”.freeze
当然如果这个镜像有问题的话,可以换成别的
第三步,执行脚本
/usr/bin/ruby brew_install
本文介绍了一种通过更改Homebrew安装脚本中的资源链接到清华大学镜像的方法,以提高在中国地区的安装速度。首先,下载并保存官方提供的安装脚本。然后,将脚本中的默认GitHub资源链接替换为清华大学的镜像链接。最后,执行修改后的脚本来完成安装。
1万+

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



