rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

Error: Rust does not seem to be installed.

Open MonkeyToiletLadder opened this issue 3 years ago • 9 comments

Ive installed rust using the link it provides, but after installation i still get this error. What could be the issue? Why cant it find my rust?

MonkeyToiletLadder avatar Sep 06 '20 02:09 MonkeyToiletLadder

rustc --version and cargo --version both return valid answers.

MonkeyToiletLadder avatar Sep 06 '20 03:09 MonkeyToiletLadder

@MonkeyToiletLadder Would you mind copy/pasting the error you're getting here? And possibly what rustc --version and cargo --version return?

calvinbrown085 avatar Sep 22 '20 20:09 calvinbrown085

I'm getting a similar error even though rustc and cargo are installed.

 We cannot find `rustc`.
 Try running `rustc --version` to diagnose your problem.
 For instructions on how to install Rust, check the README.
 
 ❯ rustc --version
 rustc 1.47.0 (18bf6b4f0 2020-10-07)
 
 ❯ cargo --version
 cargo 1.47.0 (f3c7e066a 2020-08-28)

rouilleux avatar Nov 18 '20 19:11 rouilleux

@rouilleux Would you be able to try again, but installing rustlings from this branch?

Also, what OS are you using?

jrvidal avatar Nov 18 '20 19:11 jrvidal

Debian, 4.19.0-11-amd64

Reported error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

Seems to ignore that my rust installation location is in my path. Where is Rustlings checking?

rouilleux avatar Nov 18 '20 20:11 rouilleux

That's strange... We perform a dry run of the same procedure that rustlings will use to run your exercises, Command::new(...).spawn(), which is the standard way to launch a command... :thinking:

Are you familiar with strace? I'd be curious to see the ouptut of strace -f your/path/to/rustlings. Or the even more verbose strace -f --no-abbrev -s 200 your/path/to/rustlings. (:warning: but be cautious, the output might contain sensitive information)

jrvidal avatar Nov 18 '20 21:11 jrvidal

So the problem only occurs when running directly from the rustlings binary.

Seems that I may have competing Rust installs which are causing a problem. Everything is fine if I launch with cargo run command or if I run the binary by specifying the toolchain with rustup run <toolchain-name> rustlings. I'm going to clean everything up and re-install Rust from rustup.

rouilleux avatar Nov 19 '20 00:11 rouilleux

make sure you restart your computer afterwards >.<

Shadowblitz16 avatar Apr 02 '21 20:04 Shadowblitz16

@MonkeyToiletLadder and @rouilleux I hope this issue got resolved.

If so we could probably close this issue.

Thanks

suryapandian avatar Jul 25 '21 06:07 suryapandian