atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.88k stars 562 forks source link

Initial cargo install fails because of missing `cargo` executable in path #1552

Open HerbCSO opened 10 months ago

HerbCSO commented 10 months ago

Very minor issue.

I attempted to install atuin on a Raspberry Pi 2B running Raspbian GNU/Linux 11 (bullseye) using the script from https://setup.atuin.sh (yeah, kinda crazy, I know ;] ). It correctly detected that it needed to install rustup (amazeballs!), and proceeded to do so, however on that initial run when it tried to do the cargo install, cargo wasn't in the path yet because rustup had just installed it, so it failed. Re-running the script worked fine (well, it got past that point, but it's still compiling right now, so I don't know if there will be other problems yet, but so far, so good! 🤞🏼 ;] ), so not a big issue, just might be nice if this case was handled - even if you just quit the script and issue a message at that point to restart your shell.

FWIW here's the output from the first install script run:

pi@flightradar24 ~ % bash <(curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh)                                                                                                                                    [245/1219]
 _______  _______  __   __  ___   __    _
|   _   ||       ||  | |  ||   | |  |  | |
|  |_|  ||_     _||  | |  ||   | |   |_| |
|       |  |   |  |  |_|  ||   | |       |
|       |  |   |  |       ||   | |  _    |
|   _   |  |   |  |       ||   | | | |   |
|__| |__|  |___|  |_______||___| |_|  |__|

Magical shell history

Atuin setup
https://github.com/atuinsh/atuin

Please file an issue if you encounter any problems!

===============================================================================

Detected Linux!
Checking distro...
Unknown or unsupported OS or architecture
Please check the README at https://github.com/atuinsh/atuin for manual install instructions
If you have any problems, please open an issue!
Do you wish to attempt an install with 'cargo'? [Y/N] y
Attempting install with cargo
cargo not found! Attempting to install rustup
info: downloading installer

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/pi/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  /home/pi/.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/pi/.cargo/bin

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

  /home/pi/.profile
  /home/pi/.bashrc
  /home/pi/.zshenv
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:

   default host triple: arm-unknown-linux-gnueabihf
     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 arm-unknown-linux-gnueabihf
info: syncing channel updates for 'stable-arm-unknown-linux-gnueabihf'
info: latest update on 2023-12-28, rust version 1.75.0 (82e1608df 2023-12-21)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
info: default toolchain set to 'stable-arm-unknown-linux-gnueabihf'

  stable-arm-unknown-linux-gnueabihf installed - rustc 1.75.0 (82e1608df 2023-12-21)

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"
rustup installed! Attempting cargo install
/proc/self/fd/11: line 154: cargo: command not found
HerbCSO commented 10 months ago

Welp, the install took > 1.5 DAYS to run and then failed with collect2: fatal error: ld terminated with signal 9 [Killed] (due to OOM-killer reaping it per this dmesg entry: [Mon Jan 15 12:45:50 2024] Out of memory: Killed process 5554 (ld) total-vm:189164kB, anon-rss:185332kB, file-rss:1884kB, shmem-rss:0kB, UID:1000 pgtables:192kB oom_score_adj:0). Bummer! So installing on a Raspberry Pi 2B with 512MB RAM is probably not going to work. Oh well. ;]