Rustup: Can't install rustup (Void Linux-musl)

Created on 2 Sep 2017  Â·  11Comments  Â·  Source: rust-lang/rustup

Hello,
I'm not sure if I'm just dumb or if it's an issue, apologies if it's the former.
I'm trying to install rustup on void linux (musl based). During the curl / sh thing on the website it just complains about not finding rustup-init (somewhere in /tmp/random_letters_here/rustup-init directory).
So then I tried compiling from source but it always fails because of a missing dependency (openSSL).
I tried cargo update and cargo clean with no luck. Maybe it doesn't compile because void linux uses LibreSSL. I don't know.
Anyways I'd really appreciate it if someone would help me with this.

Most helpful comment

I have the same issue, using alpine here.

rpi [~]$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
sh: /tmp/tmp.gEbhdG/rustup-init: not found

All 11 comments

Update: I managed to build it (maybe I confused that part with building rust?) but now the executables in ~/.cargo/bin/ don't work.

The script also doesn't work for me (alpine linux, also musl) with the same error.

Turns out that the rustup-init binary is linked to glibc, so it will fail:

paradoxspiral@misaki> ld rustup-init
ld: warning: libdl.so.2, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: librt.so.1, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libpthread.so.0, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libc.so.6, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: ld-linux-x86-64.so.2, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: libm.so.6, needed by rustup-init, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
rustup-init: undefined reference to `gettimeofday@GLIBC_2.2.5'
rustup-init: undefined reference to `memset@GLIBC_2.2.5'
rustup-init: undefined reference to `strncpy@GLIBC_2.2.5'
rustup-init: undefined reference to `inet_ntop@GLIBC_2.2.5'
rustup-init: undefined reference to `pthread_cond_signal@GLIBC_2.3.2'
rustup-init: undefined reference to `clock_gettime@GLIBC_2.2.5'
rustup-init: undefined reference to `strlen@GLIBC_2.2.5'
rustup-init: undefined reference to `gai_strerror@GLIBC_2.2.5'
rustup-init: undefined reference to `pthread_mutexattr_settype@GLIBC_2.2.5'
rustup-init: undefined reference to `setenv@GLIBC_2.2.5'
…

Providing a rustup-init that is linked against musl, and detecting that in the script would be awesome!

Hey, I have the same issue. Would love a musl linked rustup-init! Is there something that can be done on our part?

Cheers!

I just encountered the same issue trying to install Rust in a CI environment. The image I'm working with is built on alpine linux which doesn't use glibc, hence the cryptic "not found" error message when the OS tries to load rustup-init into memory.

For what it's worth, Void appears to feature a "rustup" package in its repository:

https://www.voidlinux.eu/packages/

Could we backport this into rustup's official downloads?

There is indeed a rustup package for Void Linux, however when you are using the musl version of Void it is as good as useless as you cannot install a toolchain. Unless I'm missing something -- I'm new to Void and Rust. I ended up uninstalling rustup and fell back to the void packaged rust and cargo.

I'm grateful for Void offering rust and cargo for musl in the main xbps repository, however for my purposes I actually need rust nightly, so that I can continue using clippy to analyze my code.

I have the same issue, using alpine here.

rpi [~]$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
sh: /tmp/tmp.gEbhdG/rustup-init: not found

same issue for me. Is there any update on this?

Dup of #1053.

We've added musl as a build target for rustup in June.

Was this page helpful?
0 / 5 - 0 ratings