解决国内 Mac 安装 brew 速度很慢问题

2019-12-13  本文已影响0人  wolfe404

一、获取 install 文件
获取官网的脚本

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_instal

二、更改脚本中的资源链接替换成清华大学的镜像,修改如下两句:

BREW_REPO = “https://github.com/Homebrew/brew“.freeze 
CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core“.freeze 

更改为

BREW_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git".freeze 
CORE_TAP_REPO = "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git".freeze

三、运行脚本

/usr/bin/ruby brew_install
上一篇 下一篇

猜你喜欢

热点阅读