Install on Chromebook Pixel (crosvm) places files in wrong place
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
I own a Chromebook Pixel, and use the crosvm (debian) option to do some coding. I tried installing Rust, and the installer placed files in the incorrect location.
Steps
- I looked up the command linked here https://www.rust-lang.org/tools/install
- I'm used to this kind of thing failing without privs, so I added a sudo before the sh and ran it, eg
curl https://sh.rustup.rs -sSf | sudo sh - The installer displayed something like the following
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.
It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:
/home/pgburt/.cargo/bin
This path will then be added to your PATH environment variable by modifying the
profile files located at:
/home/pgburt/.profile
/home/pgburt/.bash_profile
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
modify PATH variable: yes
1) Proceed with installation (default)1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
- I pressed
1to do the default installation. - The install appeared to succeed, but instructed me to run a script in
$HOME/.cargo/envto set my PATH. When I tried running that script, I found nothing there. - Trying to run
rustupshowed it wasn't registered.
I expected the install to put everything in my $HOME directory, which should be /home/pgburt. Instead, it placed the files in /root.
I was able to fix the problem by moving the directory to my actual $HOME, and running the env script. I got a error: no default toolchain configured when running rustc after that, so was able to fix by running rustup install stable which seems to work.
Meta
In lieu of a rustc version, I can run curl https://sh.rustup.rs -sSf | less and see the value: rustup-init 1.18.3 (302899482 2019-05-22)
ChromeOS: Version 74.0.3729.159 (Official Build) (64-bit)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the installer entry point exposed by sh.rustup.rs and rustup-init 1.18.3, focusing on how sudo affects HOME and installation paths. Reproduce the command on the reported ChromeOS/crosvm setup and verify that files and ~/.cargo/env are placed under /home/pgburt rather than /root, with rustup usable afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100