Error during Rust installation: connection reset, but link works in browser

Hi everyone,

I'm trying to install Rust on my Windows 10 machine using the official rustup-init.exe installer. However, I encounter a download error that prevents the installation from proceeding.

Here are the details shown in the terminal:

Current installation options:

default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes

Proceed with standard installation (default - just press enter)

Customize installation

Cancel installation

info: profile set to 'default'
info: default host triple is x86_64-pc-windows-msvc
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
error: failed to download file error=Reqwest(reqwest::Error { kind: Request, url: "https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256", source: hyper_util::client::legacy::Error(SendRequest, hyper::Error(Io, Kind(ConnectionReset))) })
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\Users\Mohsen.rustup\tmp\98s3q_22ngg8ccr2_file': error downloading file: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): client error (SendRequest): connection error: connection reset

Interestingly, when I open this exact URL in my browser:

:link: https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256

…the file downloads without any problem.

What I’ve tried so far:

  • Ran rustup-init.exe as administrator
  • Tried with and without VPN
  • Disabled antivirus and firewall
  • Set HTTPS_PROXY manually to match the VPN proxy

None of these fixed the issue. The error still occurs, saying the connection was reset.

Any idea what might be causing this and how to fix it?

Thanks in advance :folded_hands:

try set the RUSTUP_LOG environment variable and run again, to get detailed logs. see: