Closed Sitkaskidding closed 2 months ago
Can you please share the output of echo $PATH
?
Did you install Rust using pacman
instead of rustup
?
Can you please share the output of cat ~/.cargo/env
and ls ~/.cargo/bin
?
To be perfectly honest I cannot remember if I installed Rust using pacman or rustup. Is there some way to check?
echo $PATH outputs /usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
cat ~/.cargo/env outputs No such file or directory
ls ~/.cargo/bin outputs mdbook rustlings
It looks like Rust was installed using pacman and it didn't add ~/.cargo/bin
to your PATH
environment variable. You see that rustlings
is already installed in ~/.cargo/bin
but it can't be found.
Either add ~/.cargo/bin
manually to PATH
or uninstall Rust from pacman and install it using the official way.
I will close the issue. But if you still need any help, don't hesitate to comment :)
See this section and what it says about ~/.cargo/bin
in PATH
. I think that Arch should just add ~/.cargo/bin
to your PATH
as intended instead of doing things its own way…
I am attempting to follow the installation instructions on the README.However when entering the command
rustlings init
i get the error "-bash: rustlings: command not found". Any other variations of therustlings
command e.g.rustlings --help
orrustlings --version
produces the same outputsudo pacman -Syu
immediately before attempting installation so all packages should be up to datecargo install rustlings
appears to complete successfullyThank you very much for your time