SSL 连接错误(LibreSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 crates.io:443 )

SSL 连接错误(LibreSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 crates.io:443 )

今天,当我在 macOS Monteney 中使用这个 Cargo 命令来构建 Rust 项目时:

cargo build

显示这样的错误:

warning: spurious network error (1 tries remaining): [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to crates.io:443 )
warning: spurious network error (1 tries remaining): [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to crates.io:443 )
warning: spurious network error (1 tries remaining): [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to crates.io:443 )
error: failed to download from `https://crates.io/api/v1/crates/tracing-core/0.1.26/download`

Caused by:
  [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to crates.io:443 )

为什么会发生这种情况?我应该做什么来修复它?我已经尝试过curl-openssl这样安装:

brew install curl-openssl

仍然无法解决这个问题。

相关内容