A note on rustup switching rustc versions not working
Saving streams: homebrew and rustup install rustc conflict, uninstall homebrew installedrustc
can be resolved.
brew uninstall rust
Description of the problem
I’m going to try it.tauriDeveloping a mobile app, the startup is stuck at the first steprustc
Incorrect version issue.
After installing rustup according to the official documentation, refer to the online experience Rust.Managing rustc versions with rustup
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
Installing and setting up the stable version
rustup install stable
rustup default stable
strangely enoughrustup toolchain list
It’s the latest 1.82.0.
runrustc -V
Still 1.64.0.
Trying to uninstall this version also prompts that this version does not exist.
rustup toolchain uninstall 1.64.0
settle (a dispute)
After tossing and turning for a while I wondered if I had installed rustc a long time ago in some other way and the above didn’t work as expected.
我用which
Checked where rustc is executing.
which rustc
It was found that its directory was the rustc installed by homebrew, not the rustc installed by rustup.
It dawned on me that there should be a problem with the sequence of environment variables. After uninstalling the previous version of rustc using brew, the rustc location became normal.
brew uninstall rust