在安装brew时出现这个错误:

  • curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决方案

  1. 先在浏览器输入这个地址:https://raw.githubusercontent.com/Homebrew/install/master/install 进不去的话检查下自己的网络啊macOS 安装brew 错误 Failed to connect to raw.githubusercontent.com port 443: Connection refused
  2. 将该网页保存成rb文件 brew_install.rb
  3. 打开终端 使用ruby运行该文件  ruby brew_install.rb  (emmm...   有些人到这儿就能解决  但对于我失效)macOS 安装brew 错误 Failed to connect to raw.githubusercontent.com port 443: Connection refused
  4. 那么接着来 在上面可以看有警告提示
  5. Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
    Bash. Please migrate to the following command:
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  6. 直接浏览器中输入网址https://raw.githubusercontent.com/Homebrew/install/master/install.sh  将其网页保存成sh脚本 install.shmacOS 安装brew 错误 Failed to connect to raw.githubusercontent.com port 443: Connection refused
  7. 在终端中修改刚刚保存的文件    chmod 777 install.sh 
  8. 运行./install.sh 会提示按回车继续 输入管理员密码 好像还得有梯子 然后就巴拉巴拉慢慢等吧 
  9. macOS 安装brew 错误 Failed to connect to raw.githubusercontent.com port 443: Connection refused

相关文章: