安装ruby Homebrew使用命令\curl -sSL https://get.rvm.io | bash -s stable
提示:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
在浏览器输入这个地址:链接在此
如果可以打开 ,应该会提示你:
Ruby Homebrew安装程序被弃用了,并在base中对其进行了重写,并让你使用命令/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)
。
如果不能打开,也可直接使用此命令。
然后如果报:RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
,
原因就是源不通,解决方法时更换镜像源: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 update
最后用 brew doctor
检查是否安装完成。