Hello I've been doing a little research and I've come across a issue I think others are having as well that I haven't quite been able to find a answer to yet. I just installed Arch Linux BTW, sorry bad joke, and I am using the AUR package installer paru that is built in rust. I installed paru before installing rust and now my system has rust and cargo but not rustup. I already unistalled paru thinking maybe the dependencies would uninstall as well but didn't. If I run the command
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustc
rust-demangler
rustdoc
rustfmt
rust-gbd
rust-gbdgui
rust-libd
as well as
cargo
cargo-clippy
cargo-fmt
I would like to just run the installer and hope everything will be ok but I want to ask here if I should delete everything in /usr/bin/ rust related and then run or what
If a package, e.g. if a paru package you’ve installed, needs the system version of rust installed as a dependency, then it might be okay to just have two rust installations; one as the dependency of your paru, and one for personal use. I’m neither familiar with paru nor Arch and AUR though. But if it’s a dependency of something you’re using, there may be no sane way of uninstalling (or replacing) the Rust that’s used for that.
As the rustup installation script is telling you, after completing your installation, you’ll just need to pay attention to how your PATH ends up being set up; the path to ~/.cargo/bin needs to get priority over /usr/bin, so that running rustc in a terminal chooses the rustup-installed one. (Easy to do a sanity-check by running which rustc after everything is installed. If it doesn’t point to the ~/.cargo/bin/rustc one but to /usr/bin/rustc, then you know you’ll need to look into how to adjust your PATH configuration.)
thank you that's exactly what I am looking into now, after the installation I get a message to set source "$HOME/.cargo/env" which fish shell gives a error for either by running the command in the terminal or adding it to my fish.config. I also tried running it for .cargo/bin
At least we've pinpointed the issue now its a matter of figuring out how to set path
I would suggest installing rustup using the arch package instead. That package provides rust, so you don't need to install the rust package separately.
Some possible downsides / things of note when using cargo install:
the default doesn’t use --locked, though of course one can do this … it’s a trade-off I suppose. Up-to-date dependencies even for more slowly maintained software may be a good thing – on the other hand, fewer people may have looked at the code to check if it isn’t doing anything unreasonable. Not using --locked can also sometimes (not very often) mean that a build may fail
keeping software installed this way up to date isn’t automatic, and requires extra effort. E.g. via tools such as cargo install-update
it’s slower to build things yourself than using a packaged binary