[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

More rustup



Hi,


<preamble>
On computer with hostname `trancilo` has user `gs0604` a working Rust
environment. It is a `rustup` install, not a Debian install.

At host `trancilo` is Rust for esp32 wanted. An Xtensa esp32, not a new
Risc-V esp32 like the esp32-C3. The Xtensa architecture is (currently?)
not supported in LLVM. At https://esp-rs.github.io/book/dependencies/installing-rust.html#xtensa-esp32-esp32-s2-esp32-s3
is documented how build such Rust.

To prevent that the working Rust for user `gs0604` gets destroyed,
is user `stappers` also installing Rust with `rustup`.
</preamble>


What I encountered:
(and at bottom my actual questions)

<screenshot>
gs0604@trancilo:~
$ su - stappers
Wachtwoord: 
stappers@trancilo:~
$ rustup
-bash: rustup: opdracht niet gevonden
stappers@trancilo:~
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
curl: (56) OpenSSL SSL_read: Verbinding is weggevallen, errno 104
rustup: command failed: downloader https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init /tmp/tmp.Xg5If9ALC1/rustup-init x86_64-unknown-linux-gnu
stappers@trancilo:~
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
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

Continue? (y/N) 

error: cannot install while Rust is installed
stappers@trancilo:~
$ ls -l /usr/bin/rust
ls: kan geen toegang krijgen tot '/usr/bin/rust': Bestand of map bestaat niet
stappers@trancilo:~
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -x
+ [  = Version JM 93t+ 2010-03-05 ]
+ set -u
+ RUSTUP_UPDATE_ROOT=https://static.rust-lang.org/rustup
+ main
+ downloader --check
+ local _dld
+ local _ciphersuites
+ local _err
+ local _status
+ check_cmd curl
+ command -v curl
+ _dld=curl
+ [ --check = --check ]
+ need_cmd curl
+ check_cmd curl
+ command -v curl
+ need_cmd uname
+ check_cmd uname
+ command -v uname
+ need_cmd mktemp
+ check_cmd mktemp
+ command -v mktemp
+ need_cmd chmod
+ check_cmd chmod
+ command -v chmod
+ need_cmd mkdir
+ check_cmd mkdir
+ command -v mkdir
+ need_cmd rm
+ check_cmd rm
+ command -v rm
+ need_cmd rmdir
+ check_cmd rmdir
+ command -v rmdir
+ get_architecture
+ local _ostype _cputype _bitness _arch _clibtype
+ uname -s
+ _ostype=Linux
+ uname -m
+ _cputype=x86_64
+ _clibtype=gnu
+ [ Linux = Linux ]
+ uname -o
+ [ GNU/Linux = Android ]
+ ldd --version
+ grep -q musl
+ [ Linux = Darwin ]
+ [ Linux = SunOS ]
+ check_proc
+ test -L /proc/self/exe
+ _ostype=unknown-linux-gnu
+ get_bitness
+ need_cmd head
+ check_cmd head
+ command -v head
+ local _current_exe_head
+ head -c 5 /proc/self/exe
+ _current_exe_head=ELF
+ printf \177ELF\001
+ [ ELF = ELF ]
+ printf \177ELF\002
+ [ ELF = ELF ]
+ echo 64
+ _bitness=64
+ _cputype=x86_64
+ [ unknown-linux-gnu = unknown-linux-gnu ]
+ [ 64 -eq 32 ]
+ [ unknown-linux-gnu = unknown-linux-gnueabihf ]
+ _arch=x86_64-unknown-linux-gnu
+ RETVAL=x86_64-unknown-linux-gnu
+ local _arch=x86_64-unknown-linux-gnu
+ assert_nz x86_64-unknown-linux-gnu arch
+ [ -z x86_64-unknown-linux-gnu ]
+ local _ext=
+ local _url=https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init
+ local _dir
+ ensure mktemp -d
+ mktemp -d
+ _dir=/tmp/tmp.0UFXoou7DX
+ local _file=/tmp/tmp.0UFXoou7DX/rustup-init
+ local _ansi_escapes_are_valid=false
+ [ -t 2 ]
+ [ set = set ]
+ _ansi_escapes_are_valid=true
+ local need_tty=yes
+ true
+ printf \33[1minfo:\33[0m downloading installer\n
info: downloading installer
+ ensure mkdir -p /tmp/tmp.0UFXoou7DX
+ mkdir -p /tmp/tmp.0UFXoou7DX
+ ensure downloader https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init /tmp/tmp.0UFXoou7DX/rustup-init x86_64-unknown-linux-gnu
+ downloader https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init /tmp/tmp.0UFXoou7DX/rustup-init x86_64-unknown-linux-gnu
+ local _dld
+ local _ciphersuites
+ local _err
+ local _status
+ check_cmd curl
+ command -v curl
+ _dld=curl
+ [ https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init = --check ]
+ [ curl = curl ]
+ get_ciphersuites_for_curl
+ [ -n  ]
+ local _openssl_syntax=no
+ local _gnutls_syntax=no
+ local _backend_supported=yes
+ curl -V
+ grep -q  OpenSSL/
+ _openssl_syntax=yes
+ local _args_supported=no
+ [ yes = yes ]
+ check_help_for notspecified curl --tlsv1.2 --ciphers --proto
+ local _arch
+ local _cmd
+ local _arg
+ _arch=notspecified
+ shift
+ _cmd=curl
+ shift
+ local _category
+ curl --help
+ grep -q For all options use the manual or "--help all".
+ _category=all
+ curl --help all
+ grep -q -- --tlsv1.2
+ curl --help all
+ grep -q -- --ciphers
+ curl --help all
+ grep -q -- --proto
+ true
+ _args_supported=yes
+ local _cs=
+ [ yes = yes ]
+ [ yes = yes ]
+ get_strong_ciphersuites_for openssl
+ [ openssl = openssl ]
+ echo TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
+ _cs=TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
+ RETVAL=TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
+ _ciphersuites=TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
+ [ -n TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384 ]
+ curl --proto =https --tlsv1.2 --ciphers TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384 --silent --show-error --fail --location https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init --output /tmp/tmp.0UFXoou7DX/rustup-init
+ _err=
+ _status=0
+ [ -n  ]
+ return 0
+ ensure chmod u+x /tmp/tmp.0UFXoou7DX/rustup-init
+ chmod u+x /tmp/tmp.0UFXoou7DX/rustup-init
+ [ ! -x /tmp/tmp.0UFXoou7DX/rustup-init ]
+ [ yes = yes ]
+ [ ! -t 1 ]
+ ignore /tmp/tmp.0UFXoou7DX/rustup-init
+ /tmp/tmp.0UFXoou7DX/rustup-init
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
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

Continue? (y/N) 


error: cannot install while Rust is installed
+ local _retval=1
+ ignore rm /tmp/tmp.0UFXoou7DX/rustup-init
+ rm /tmp/tmp.0UFXoou7DX/rustup-init
+ ignore rmdir /tmp/tmp.0UFXoou7DX
+ rmdir /tmp/tmp.0UFXoou7DX
+ return 1
+ exit 1
stappers@trancilo:~
$ command -v rustup
stappers@trancilo:~
$ exit
uitgelogd
gs0604@trancilo:~
$ command -v rustup
/home/gs0604/.cargo/bin/rustup
gs0604@trancilo:~
$ 
</screenshot>

Okay, another attempt.

<screenshot>
gs0604@trancilo:~
$ su - stappers
Wachtwoord: 
stappers@trancilo:~
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
warning: it looks like you have an existing installation of Rust at:
warning: /usr/bin
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

Continue? (y/N) y


Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /home/stappers/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

  /home/stappers/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  /home/stappers/.cargo/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /home/stappers/.profile
  /home/stappers/.bashrc

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2022-04-07, rust version 1.60.0 (7737e0b5c 2022-04-04)
info: downloading component 'cargo'
  6.3 MiB /   6.3 MiB (100 %)   2.1 MiB/s in  3s ETA:  0s
info: downloading component 'clippy'
  2.6 MiB /   2.6 MiB (100 %)   2.1 MiB/s in  1s ETA:  0s
info: downloading component 'rust-docs'
 19.5 MiB /  19.5 MiB (100 %)   2.0 MiB/s in  9s ETA:  0s
info: downloading component 'rust-std'
 26.3 MiB /  26.3 MiB (100 %)   2.1 MiB/s in 13s ETA:  0s
info: downloading component 'rustc'
 54.6 MiB /  54.6 MiB (100 %)   2.0 MiB/s in 27s ETA:  0s
info: downloading component 'rustfmt'
  3.9 MiB /   3.9 MiB (100 %)   2.1 MiB/s in  1s ETA:  0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 19.5 MiB /  19.5 MiB (100 %)  11.8 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 26.3 MiB /  26.3 MiB (100 %)  15.9 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 54.6 MiB /  54.6 MiB (100 %)  18.3 MiB/s in  2s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu installed - rustc 1.60.0 (7737e0b5c 2022-04-04)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source $HOME/.cargo/env
stappers@trancilo:~
$ source $HOME/.cargo/env
stappers@trancilo:~
$ command -v rustup
/home/stappers/.cargo/bin/rustup
stappers@trancilo:~
$ 
</screenshot>

Should the false positive on installed rust be reported upstream?

Should there be a Debian packaged alternative to the

  curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh


??



 
Groeten
Geert Stappers
-- 
Silence is hard to parse


Reply to: