Again the old cant find std crate issue

This sounds ridiculous but I had an old rust installation working and removed it to install rust 1.12 from the tarball. I untarred and did sudo ./ just to find out it doesn't work because it can't find std when I do cargo build on a project, even though I can see /usr/local/lib/rustlib with, what I think is, std crate. I uninstalled and used instead to no avail. I added it to LD_LIBRARY_PATH to no avail and after each of these attempts started a new terminal to make sure it was not that but also to no avail. What's the correct procedure to get this working? Rust book means a single curl command with to get it working but that can't be all.

What magic am I missing?



It would be helpful if you could paste the output of cargo --verbose build, which cargo, which rustc, cargo --version and rustc --version to provide some more information exactly what commands are being run and what version they are.

Normally just the script should be sufficient, like the book says, so there's probably something on your system left over from the old installation that's causing problems; the output of the above commands should help narrow down what that might be.

Another alternative is to use, a new version of rustup that's written in Rust, provides many more features like managing multiple versions at once, and installs everything in your home directory rather than system-wide. It's still in beta, so it's not yet the officially recommended way of installing Rust, but it likely will replace at some point.

Thanks @lambda. Apologies for the lack of information. I found the problem. I will add more detail soon.

I wrote the resolution to this issue here.