Rustup install problem in WSL

Hello,

I try to install rustup on my WSL box which contains ubuntu 20.04,
But as soon as I run the installer I see this :

info: downloading component 'rustc'
 60.3 MiB /  60.3 MiB (100 %)  30.2 MiB/s in  2s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:166:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `22`,
 right: `4`', src/libstd/sys/unix/thread.rs:166:21
stack backtrace:
   0:     0x7fae86edbc9c - backtrace::backtrace::libunwind::trace::h65597d255cb1398b
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x7fae86edbc9c - backtrace::backtrace::trace_unsynchronized::hd4f479d7150ec4a0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x7fae86edbc9c - std::sys_common::backtrace::_print_fmt::h015072984a2b172c
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x7fae86edbc9c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6df05d3335f32194
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x7fae86bba81c - core::fmt::write::h1f444f4312eb6c27
                               at src/libcore/fmt/mod.rs:1028
   5:     0x7fae86edb526 - std::io::Write::write_fmt::h8d147888220078ef
                               at src/libstd/io/mod.rs:1412
   6:     0x7fae86edb19e - std::sys_common::backtrace::_print::h8a6df0fa81d6af62
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x7fae86edb19e - std::sys_common::backtrace::print::h6f05b4733407e509
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x7fae86edb19e - std::panicking::default_hook::{{closure}}::h0d0a23bd02315dd8
                               at src/libstd/panicking.rs:188
   9:     0x7fae86eda943 - std::panicking::default_hook::h8d15a9aecb4efac6
                               at src/libstd/panicking.rs:205
  10:     0x7fae86eda943 - std::panicking::rust_panic_with_hook::hbe174577402a475d
                               at src/libstd/panicking.rs:464
  11:     0x7fae86eda4be - std::panicking::continue_panic_fmt::h4d855dad868accf3
                               at src/libstd/panicking.rs:373
  12:     0x7fae86eda450 - std::panicking::begin_panic_fmt::ha0f013e3301a9528
                               at src/libstd/panicking.rs:328
  13:     0x7fae86eaae86 - <rustup::diskio::threaded::Threaded as rustup::diskio::Executor>::join::hf33124263a81d2a4
  14:     0x7fae86eaa636 - core::ptr::real_drop_in_place::haa8255139d9471a2
  15:     0x7fae86bd5190 - core::ptr::real_drop_in_place::h04c627b98e68397b
  16:     0x7fae86e9e777 - rustup::dist::component::package::unpack_without_first_dir::h352b57d236248e9a
  17:     0x7fae86e762f6 - rustup::dist::manifestation::Manifestation::update::h8c800deec8167b5b
  18:     0x7fae86e64b8a - rustup::dist::dist::try_update_from_dist_::h113375517e7a85ca
  19:     0x7fae86e4964c - rustup::toolchain::Toolchain::install::h048b51ffab245b48
  20:     0x7fae86e46c8c - rustup::toolchain::Toolchain::install_from_dist::h00b9aafeb93470e5
  21:     0x7fae86b143ee - rustup_init::self_update::install::h4cee0e396cee456b
  22:     0x7fae86b25ca2 - rustup_init::run_rustup_inner::ha545371fd2dc19a6
  23:     0x7fae86b22d64 - rustup_init::main::hba9a23e308c96901
  24:     0x7fae86ab7a03 - std::rt::lang_start::{{closure}}::h1778d9ce6385bef5
  25:     0x7fae86b2c458 - main
  26:     0x7fae867570b3 - __libc_start_main
  27:     0x7fae86ab4029 - <unknown>

Anyone seen this before ?

Roelof

Please wrap your error message in

```text
error message here....
```

for better readability.

That's odd. It's probably this assertion:

and errno 22 is "invalid argument".

I have no idea how that could happen though.

Please submit this as a bug to rustup.

This has been a pinned issue for quite a while now

It seems like Microsoft have no plans (in the near term) to fix it in WSLv1, so you need to move to WSLv2 or stick with an older distro that doesn't use a modern glibc.

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.