Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer gets killed during installation #2717

Closed
kinnison opened this issue Apr 12, 2021 · 12 comments
Closed

Installer gets killed during installation #2717

kinnison opened this issue Apr 12, 2021 · 12 comments
Labels

Comments

@kinnison
Copy link
Contributor

Please I am unable to install rust 1.51.0 on Ubuntu 20.10 (groovy).
What could be wrong?

eshikafe@eshikafe-vb:~$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
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/eshikafe/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:

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

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

  /home/eshikafe/.profile
  /home/eshikafe/.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 2021-03-25, rust version 1.51.0 (2fd73fabe 2021-03-23)
info: downloading component 'cargo'
  6.0 MiB /   6.0 MiB (100 %)   3.4 MiB/s in  2s ETA:  0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 14.9 MiB /  14.9 MiB (100 %)   1.4 MiB/s in 17s ETA:  0s
info: downloading component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)   1.3 MiB/s in 23s ETA:  0s 
info: downloading component 'rustc'
 50.4 MiB /  50.4 MiB (100 %)   3.2 MiB/s in 19s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: using up to 500.0 MiB of RAM to unpack components
info: installing component 'clippy'
info: installing component 'rust-docs'
 14.9 MiB /  14.9 MiB (100 %)   3.1 MiB/s in  4s ETA:  0s
info: installing component 'rust-std'
 24.9 MiB /  24.9 MiB (100 %)   5.4 MiB/s in  5s ETA:  0s
info: installing component 'rustc'
 30.1 MiB /  50.4 MiB ( 60 %)   6.0 MiB/s in  5s ETA:  3sKilled
eshikafe@eshikafe-vb:~$ 

rustup is unable to install rustc. It gets Killed while installing rustc.

Originally posted by @eshikafe in #2661 (comment)

@kinnison
Copy link
Contributor Author

Hi @eshikafe

Are you able to tell me how much RAM that system has? Is there any indication in the kernel's logs (visible via the dmesg command) which corresponds with you trying to install Rust?

That kind of message typically happens if you run out of RAM, or if there's something even more wrong with the system.

@eshikafe
Copy link

Thanks @kinnison for the hint. I increased my VM's RAM from 1G to 4G to resolve the issue.

@rbtcollins
Copy link
Contributor

Should be fixed with 1.24.1

@foresterre

This comment has been minimized.

@rbtcollins
Copy link
Contributor

Fixed by 1.24.2 for sure.

@BnDLett
Copy link

BnDLett commented Feb 18, 2024

Currently having this issue on my rpi zero 2 w, which has 512 MB of RAM. Currently plan on building and running on my rpi rather than just building on my local machine.

@aschaeffer
Copy link

Currently having this issue on my rpi zero 2 w, which has 512 MB of RAM. Currently plan on building and running on my rpi rather than just building on my local machine.

I had the same issue. You can temporarily enable and increase the swap to install the rust toolchain:

https://gist.github.com/tstellanova/0a6d8a70acc58a0d5be13ebaa7c935d4?permalink_comment_id=4647130#gistcomment-4647130

It would be helpful if rustup would warn about insufficient memory.

@BnDLett
Copy link

BnDLett commented Feb 21, 2024

Would absolutely be useful, yes.

@rami3l
Copy link
Member

rami3l commented Feb 21, 2024

@rbtcollins Looks like #2707 hasn't completely addressed this issue?

@rami3l
Copy link
Member

rami3l commented Feb 21, 2024

@BnDLett @aschaeffer I found some workarounds which might be helpful for you:

For whomever finds this thread while trying to install on raspberry pi zero 2w, I had to export RUSTUP_UNPACK_RAM=250000000 to get it to work

Originally posted by @ixje in #2564 (comment)

A bit of a necro, but I was able to install rustc on a 512MB RAM OrangePi (4 cores) by also setting RUSTUP_IO_THREADS=1.

Originally posted by @mon in #2919 (comment)

@rami3l
Copy link
Member

rami3l commented Apr 27, 2024

Related to #2919.

@AndreasOM
Copy link

Just hit this today on an EC2 instance.

Workaround for reference:
Create a swap file. (dd, mkswap, swapon)

You have to uninstall and (re)install the toolchain, as it ends up in a very broken state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants