asdf-rust
asdf-rust copied to clipboard
Wrong version got installed for latest
I used asdf update to install the latest version of rust and it got shown in asdf as 1.63. When calling cargo/rustc, these commands reported version 1.56. I did a asdf uninstall rust
and reinstalled, leading to this session:
[20:16:25] λ asdf install rust latest
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /home/jan/.asdf/shims
warning: rustup should not be installed alongside Rust. Please uninstall your existing Rust first.
warning: Otherwise you may have confusion unless you are careful with your PATH
warning: If you are sure that you want both rustup and your already installed Rust
warning: then please reply `y' or `yes' or set RUSTUP_INIT_SKIP_PATH_CHECK to yes
warning: or pass `-y' to ignore all ignorable checks.
error: cannot install while Rust is installed
warning: continuing (because the -y flag is set and the error is ignorable)
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for '1.63.0-x86_64-unknown-linux-gnu'
info: latest update on 2022-08-11, rust version 1.63.0 (4b91a6ea7 2022-08-08)
info: downloading component 'cargo'
...
info: default toolchain set to '1.63.0-x86_64-unknown-linux-gnu'
1.63.0-x86_64-unknown-linux-gnu installed - rustc 1.63.0 (4b91a6ea7 2022-08-08)
Rust is installed now. Great!
To get started you need Cargo's bin directory
(/home/jan/.asdf/installs/rust/1.63.0/bin) in your PATH
environment variable. This has not been done automatically.
To configure your current shell, run:
source "/home/jan/.asdf/installs/rust/1.63.0/env"
[20:17:11] λ rustc --version
rustc 1.56.1 (59eed8a2a 2021-11-01)
[20:23:22] λ ~/.asdf/installs/rust/1.63.0/bin/cargo --version
cargo 1.56.0 (4ed5d137b 2021-10-04)
In the end I had to do a rustup update
to get the right versions:
[20:23:41] [1] ✗ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-08-11, rust version 1.63.0 (4b91a6ea7 2022-08-08)
...
info: installing component 'rustfmt'
error: rustup is not installed at '/home/jan/.cargo'
[20:24:27] [1] ✗ cargo --version
cargo 1.63.0 (fd9c4297c 2022-07-01)
I've no clue what can influence what rustup is actually installing in the end, but this was surprising to me, I had expected that asdf rust versions are installed completely outside of any config I may locally have.
$HOME/.rustup/settings.toml
contains (now, after rustup update
!)
default_toolchain = "stable"
profile = "default"
version = "12"
[overrides]