问题1:
curl Failed to connect to raw.githubusercontent.com port 443
本人在安装brew时遇到上述问题,找了一个晚上的原因,终于找到了解决放方法:
输入指令sudo gem install redis,再输入安装brew指令即可。
问题2:
下载速度慢 超时
一、获取 install 文件,把官网给的脚本拿下来
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
二、更改脚本中的资源链接
这里替换成清华大学的镜像,修改如下两句:
vi 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
问题3:
brew cask安装失败
fatal: unable to access 'https://github.com/Homebrew/homebrew-cask/': Failed to connect to github.com port 443: Operation timed out
clone其它镜像地址
git clone http://mirrors.ustc.edu.cn/homebrew-cask.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask --depth=1
修改远程仓库
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/
git remote set-url origin http://mirrors.ustc.edu.cn/homebrew-cask.git