I installed Rust using rustup, but when I try to enter a Rust command like cargo
or rustc
in my console, the following error appears:
error: no default toolchain configured
Is this a known issue?
I installed Rust using rustup, but when I try to enter a Rust command like cargo
or rustc
in my console, the following error appears:
error: no default toolchain configured
Is this a known issue?
If it seems that rustup did not successfully install and configure the stable toolchain, you can do it manually:
rustup install stable
rustup default stable
After testing, it seems like my incomplete installation may have been caused by a network error. You can also try to reinstall to solve the problem.
rustup default stable
did the install as well, no need to run two commands –
Epimenides The problem is due to my connection and my proxy which didn't allow rustc, cargo, and others to be downloaded.
I thought that the all the executables were all-in-one but apparently not.
In my case, I had multirust installed and the following worked for me:
multirust install stable
multirust default stable
I installed rust with root, but my IDE doesn't run as root, so I installed rust without root, all worked well.
© 2022 - 2024 — McMap. All rights reserved.
rustup toolchain list
? – Breugheldefault toolchain: stable (default)
and after running, the message says:info: default toolchain set to 'stable-x86_64-pc-windows-msvc' stable-x86_64-pc-windows-msvc installed - rustc 1.66.0 (69f9c33d7 2022-12-12)
weird... – VegetableRUSTUP_HOME
andCARGO_HOME
to theC:` directory directly:
set "RUSTUP_HOME=C:\.rustup" & set "CARGO_HOME=C:\.cargo"` , I got this error. When I uninstalled and let the default values:%USERPROFILE%\.cargo
and%USERPROFILE%\.rustup
, I didn't get this error anymore. That's OK, I guess plenty of other directories are installed at%USERPROFILE%
, like.matplotlib
,.gem
,.ipynb
,.ssh
– Vegetable