Unable to add thumbv7em-none-eabihf target

Running rustup target add thumbv7em-none-eabihf gives the following error:

info: downloading component 'rust-std' for 'thumbv7em-none-eabihf'
error: component download failed for rust-std-thumbv7em-none-eabihf: request or response body error: error reading a body from connection: end of file before message length reached

I have tried it on two machines, 1) WSL Ubuntu and 2) Raspberry Pi. Here's the output of rustup show

WSL Ubuntu
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/snehanshu/.rustup

stable-x86_64-unknown-linux-gnu (default)
rustc 1.77.0 (aedd173a2 2024-03-17)
RPi
Default host: aarch64-unknown-linux-gnu
rustup home:  /home/snehanshu/.rustup
 
stable-aarch64-unknown-linux-gnu (default)
rustc 1.77.2 (25ef9e3d8 2024-04-09)

it's likely a network connectivity issue. you may try to install it some time later, maybe change your internet configuration.

to test the connection, try download the manifest file using your browser. for example, the manifest for 1.77.0 should be https://static.rust-lang.org/dist/channel-rust-1.77.0.toml

or in case the aws server is temporarily inaccessible, if you know any mirror sites, you can download from a mirror server, just set the RUSTUP_DIST_SERVER environment variable. for example:

$ # default server is static.rust-lang.org 
$ export RUSTUP_DIST_SERVER=https://some-rust-mirror-server.example.com/
$ rustup target add thumbv7em-none-eabihf

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.