在安装 Ruby 依赖 openssl@3 时,您可能会遇到以下错误:

'Error: Failure while executing; /usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.14-31-gcf25397 \(Macintosh\; Intel\ Mac\ OS\ X\ 13.0\) curl/7.84.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles//openssl%403-3.1.1_1.ventura.bottle.tar.gz exited with 22. Here's the output: curl: (22) The requested URL returned error: 403 HTTP/2 403 server: nginx/1.18.0 date: Thu, 19 Oct 2023 03:32:34 GMT content-type: text/html vary: Accept-Encoding strict-transport-security: max-age=31536000 x-tuna-mirror-id: neomirrors'

此错误消息表明请求的 URL 返回了 403 Forbidden 错误。这可能是由于以下原因导致的:

  • 服务器拒绝访问资源
  • 资源在指定的 URL 上不可用

要解决此问题,您可以尝试以下步骤:

  1. 检查您的网络连接:确保您拥有稳定的网络连接,然后重试安装。
  2. 重试安装:重新运行安装命令,因为错误可能是临时的。
  3. 更新 Homebrew:通过运行以下命令确保您拥有最新版本的 Homebrew:
    brew update
    
  4. 使用不同的镜像:Homebrew 使用镜像来下载软件包。在本例中使用的镜像是 mirrors.tuna.tsinghua.edu.cn。您可以尝试通过在运行安装命令之前设置 HOMEBREW_BOTTLE_DOMAIN 环境变量来切换到不同的镜像。例如:
    export HOMEBREW_BOTTLE_DOMAIN=https://homebrew.bintray.com/bottles
    brew install openssl@3
    
  5. 等待并稍后尝试:如果问题仍然存在,可能是镜像的临时问题。您可以等待一段时间,然后再尝试安装。

如果以上解决方案均无效,您可以考虑联系 Homebrew 社区或镜像提供商以获取进一步的帮助。


原文地址: https://www.cveoy.top/t/topic/pmtK 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录