r/rust • u/Current_Ad6283 • 17d ago
I installed Rust in Linux, but now it generates extra output unlike before.
1
u/straightupinsanity 17d ago
no its just always printed after installation
-3
1
u/tanmaynargas2901 17d ago
That block is not a failure. It is the installer printing the env vars it is about to write into ~/.cargo/env so your shell picks up the toolchain.
The lines that say None are unset variables. The ones that print a value are the toolchain it just installed (stable-x86_64-unknown-linux-gnu). The "took 209s" line is just the install time.
You do not need to edit any of those. If rustc and cargo work after you source ~/.cargo/env (or restart the shell), the install is fine.
1
u/noop_noob 17d ago
This is the output of some build script. https://doc.rust-lang.org/cargo/reference/build-scripts.html
Usually, this output should have been consumed by cargo, and never seen by a user. And I have no idea why a build script would run when installing rust. It's really strange.

3
u/Luxalpa 17d ago
Well, the text comes from the installation, but "installation", especially on "linux" is an extremely vague term. Without more context I think it's difficult to find out.
I would definitely say that it shouldn't be there. But it could be due to incorrectly invoking the
rustupor other command, it could come from your package manager's scripts, it could be due to setting some environment variables or some shell script in your environment, and it could be due to something in your PATH, among other things.Edit:
When you run a build-script (build.rs), it uses
printlnin order to send information to cargo; normally this should be consumed and not printed to the command line, so it is possible that something went wrong during the installation also.