今天,当我在 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
仍然无法解决这个问题。