0

I'm a beginner trying to set up a Rust project on my computer. I've installed Rust from the official website and I'm trying to install the cargo-ndk crate using the cargo install command, but I keep getting a network error. Here's the error message I see in my terminal:

Updating crates.io index
warning: spurious network error (2 tries remaining): failed to send request: A connection with the server could not be established
; class=Os (2)
warning: spurious network error (1 tries remaining): failed to send request: A connection with the server could not be established
; class=Os (2)
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to send request: A connection with the server could not be established
  ; class=Os (2)

I've checked my internet connection, confirmed that GitHub is not blocked, and I don't have any active proxy settings. I'm not sure what else to try. How can I fix this issue and successfully install the cargo-ndk crate using cargo install?

cafce25
  • 15,907
  • 4
  • 25
  • 31
  • Does this fix it? https://github.com/rust-lang/cargo/issues/9335 – drewtato Apr 02 '23 at 20:06
  • Try prefixing the command with [winpty](https://github.com/rprichard/winpty), certain cargo commands are fidgety that way – luke May 24 '23 at 22:21

0 Answers0