描述

在Mac上安装Homebrew时安装失败并显示: curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决办法

修改Mac的DNS配置

  1. 打开系统偏好设置 -> 网络 -> 高级 -> DNS
    Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused
    Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused
    Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused

  2. 点击左侧的 + 添加谷歌的DNS: 8.8.8.8
    Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused

  3. 进入Homebrew官网拷贝安装代码到终端即可安装 Homebrew
    Mac无法安装Homebrew Failed to connect to raw.githubusercontent.com port 443: Connection refused

相关文章: