mac安装homebrew显示curl: (28) Failed to connect to raw.githubusercontent.com port 443 after 75005 ms: Couldn't connect to server
时间: 2023-11-21 09:56:03 浏览: 267
这个错误通常是由于网络连接问题导致的。你可以尝试以下几种方法来解决这个问题:
1. 检查你的网络连接是否正常,确保你可以访问raw.githubusercontent.com网站。
2. 尝试使用代理来连接,你可以在终端中设置代理,例如:
```shell
export http_proxy=http://yourproxyaddress:proxyport
export https_proxy=https://yourproxyaddress:proxyport
```
其中,yourproxyaddress是你的代理地址,proxyport是代理端口号。
3. 如果以上方法都无法解决问题,你可以尝试使用Homebrew国内源安装脚本,命令如下:
```shell
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
```
这个脚本会将Homebrew的源替换为国内源,从而加快下载速度。
相关问题
mac安装brew遇到问题:Failed to connect to raw.githubusercontent.com port 443 after 2 ms: Couldn't connect to server
这个问题可能是由于网络连接问题导致的。你可以尝试以下解决方案:
1. 检查你的网络***运行命令。
3. 通过修改 host 文件来尝试绕过可能存在的 DNS 解析问题。可以尝试将以下内容添加到 /etc/hosts 文件中:
```
199.232.68.133 raw.githubusercontent.com
```
保存文件后再次尝试安装。
如果以上方法仍然无法解决问题,你可以尝试使用其他方式安装 Homebrew 或者等待一段时间后再次尝试。
mac 卸载brew报错。curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 72 ms: Couldn't connect to server
以下是解决mac卸载brew报错的方法:
1. 首先,尝试使用以下命令卸载brew:
```shell
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
```
2. 如果上述命令无法正常运行,可能是由于网络问题导致curl无法连接到raw.githubusercontent.com。可以尝试以下解决方法:
- 确保你的网络连接正常。
- 检查你的防火墙设置,确保允许curl连接raw.githubusercontent.com。
- 尝试使用以下命令替换上述命令中的URL:
```shell
ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/Homebrew/install/install)"
```
这个URL使用了jsdelivr的CDN服务,可能会更容易连接成功。
3. 如果上述方法仍然无法解决问题,可以尝试手动卸载brew。具体步骤如下:
- 删除brew安装目录(默认为/usr/local)下的所有文件和文件夹。
- 删除~/.brew和~/.homebrew文件夹(如果存在)。
- 删除~/.bashrc和~/.bash_profile文件中与brew相关的行。
- 删除~/.zshrc和~/.zprofile文件中与brew相关的行(如果你使用zsh)。
4. 如果你仍然无法卸载brew,可以尝试在brew的GitHub页面上提交一个issue,向开发者请求帮助。
--相关问题--:
1. 如何在mac上安装brew?
2. 如何使用brew安装软件包?
3. 如何升级brew
阅读全文
相关推荐

















