You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I would like to install Rust under my user directory and then give access to other users in the same group. I am close to getting the results that I want, but I am getting stuck. I have done the following:
Installed rust with the rustup script.
Given execute (chmod g+x) permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin
Given execute permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib
Given execute permissions to the directories along the chain .rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/
On the other user's end, I did the following:
Added the binaries to their path: export PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/:$PATH"
Added the compiler's runtime libraries and the Rust libraries to their library path: export LD_LIBRARY_PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/:$LD_LIBRARY_PATH"
The problem seems to be that rustc cannot find the rust standard libraries. The following process gives an error:
$ cargo new hello_world --bin
Created binary (application) `hello_world` project
$ cd hello_world/
$ cargo run
Compiling hello_world v0.1.0 (file:///home/aclark2/hello_world)
error[E0463]: can't find crate for `std`
error: aborting due to previous error
error: Could not compile `hello_world`.
To learn more, run the command again with --verbose.
$ cargo run --verbose
Compiling hello_world v0.1.0 (file:///home/aclark2/hello_world)
Running `rustc src/main.rs --crate-name hello_world --crate-type bin -g -C metadata=c19af5a8f8086d2b --out-dir /home/aclark2/hello_world/target/debug --emit=dep-info,link -L dependency=/home/aclark2/hello_world/target/debug/deps`
error[E0463]: can't find crate for `std`
error: aborting due to previous error
error: Could not compile `hello_world`.
Caused by:
process didn't exit successfully: `rustc src/main.rs --crate-name hello_world --crate-type bin -g -C metadata=c19af5a8f8086d2b --out-dir /home/aclark2/hello_world/target/debug --emit=dep-info,link -L dependency=/home/aclark2/hello_world/target/debug/deps` (exit code: 101)
I also tried the following to no avail:
$ rustc -L/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/ main.rs
error[E0463]: can't find crate for `std`
error: aborting due to previous error
If you have any recommendations on how to tell rustc where to find the standard library I would appreciate it. Thanks!
The text was updated successfully, but these errors were encountered:
Hello, I would like to install Rust under my user directory and then give access to other users in the same group. I am close to getting the results that I want, but I am getting stuck. I have done the following:
.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin
.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib
.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/
On the other user's end, I did the following:
export PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/:$PATH"
export LD_LIBRARY_PATH="/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib:/home/aclark/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/:$LD_LIBRARY_PATH"
The problem seems to be that
rustc
cannot find the rust standard libraries. The following process gives an error:I also tried the following to no avail:
If you have any recommendations on how to tell
rustc
where to find the standard library I would appreciate it. Thanks!The text was updated successfully, but these errors were encountered: