Rustup: Downloading rust-src fails

Does anyone know how to fix this?

.cargo/bin/rustup component add rust-src
info: downloading component 'rust-src'
 26.4 MiB /  26.4 MiB (100 %) 688.0 KiB/s ETA:   0 s                
info: installing component 'rust-src'
info: rolling back changes
error: component manifest for 'rust-src' is corrupt

There were a few days after initial rollout where rustc-src was corrupt. What does rustc -Vv say? If it's old I'd suggest upgrading with rustup update nightly first.

I don't see this error locally on the most recent nightly.

1 Like

Strange: I reinstalled yesterday everything with rustup, because I reainstalled Linux, but with the same home directory. And somehow rustup show pointed to an old nightly build. I removed it and now it works.

This also happened to me on a Windows platform with an Antivirus software enabled. I turned off an Antivirus, but rustup still refused to install rust-src component. It installed successfully, when only I had to manually delete the src directory.