You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

MacOS Ventura13.0.1安装Homebrew遇curl(35)SSL错误求助

Homebrew安装SSL错误排查方案(MacOS Ventura13.0.1)

1. 修复raw.githubusercontent.com的DNS解析

  • 执行命令检查当前解析结果:
    nslookup raw.githubusercontent.com
  • 如果返回异常IP(如0.0.0.0),手动修改hosts文件:
    1. 打开终端运行:sudo nano /etc/hosts
    2. 在文件末尾添加一行(替换为有效的GitHub IP,例如185.199.108.133 raw.githubusercontent.com)
    3. 按Ctrl+O保存,Ctrl+X退出编辑器
    4. 刷新DNS缓存:sudo dscacheutil -flushcache

2. 临时跳过SSL证书验证

修改安装命令,添加-k参数忽略SSL证书校验(仅临时使用):
/bin/bash -c "$(curl -v -fsSLk https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

3. 使用国内镜像源安装(推荐)

通过国内代理镜像下载安装脚本,避免网络问题:

  1. 下载脚本到本地:
    curl -fsSL https://ghproxy.com/https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > brew_install.sh
  2. 执行安装脚本:
    /bin/bash brew_install.sh
  3. 安装完成后配置国内镜像源(后续更新更稳定):
    echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.zshrc
    source ~/.zshrc
    

4. 检查系统SSL库兼容性

  • 查看当前系统SSL版本:openssl version
  • 若Ventura自带的LibreSSL存在兼容性问题,可在安装Homebrew后执行以下命令替换为OpenSSL:
    brew install openssl
    然后将OpenSSL加入环境变量:
    echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

内容的提问来源于stack exchange,提问作者Prabhu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.06 20:15:40