https://brew.sh/index_zh-cn.html
由于网络问题,需要修改hosts文件
打开网站https://www.ipaddress.com/
查询一下 raw.githubusercontent.com
对应的IP 地址
追加加以下内容
199.232.68.133 raw.githubusercontent.com
然后执行安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
替换homebrew默认源
// 执行下面这句命令,更换为中科院的镜像:
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
// 把homebrew-core的镜像地址也设为中科院的国内镜像
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
// 使用
brew install telnet