解决mac下安装homebrew速度慢的问题

1,454 阅读1分钟

终极方案

亲测完美:brew.idayer.com/

官网的安装方法

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

此方法很慢,基本上很难下载下来

替换下载源下载

$ cd ~/Desktop # 首先找个你能找到的位置,比如桌面
$ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh >> install.sh # 将官方的安装shell脚本拷贝到桌面

替换源

$ # 打开 install.sh 文件,修改如下:
$ # 找到如下代码:
$ “https://github.com/Homebrew/brew“
$ “https://github.com/Homebrew/homebrew-core“
$ #更改为:
“https://mirrors.ustc.edu.cn/brew.git “
“https://mirrors.ustc.edu.cn/homebrew-core.git

执行安装

$ chmod 777 install.sh # 修改文件权限
$ ./install.sh # 执行shell脚本安装

然后等待安装就行了