version: 1.0.0 beta 5
I have gotten as as far as running the install.sh script with the argument "--prefix=$HOME/local" (installing to my home directory)
and this works fine, but ldconfig (part of the install.sh process) fails because of lack of root privileges, and then rustc is unable to find the libraries
rustc: error while loading shared libraries: librustc_driver-4e7c5e5c.so: cannot open shared object file: No such file or directory
Build and run a Rust project locally To build the project locally, go to the root directory and run cargo build . This build runs rustc for you, using attributes from the Cargo. toml file. After the project is built, run the Rust project using the command cargo run .
The official way to install Rust system-wide in a manner that is only updatable by an authorized administrator is to use the official standalone installer. To install rust this way, you download the installer, extract it in a directory, and then run sudo ./install .
If you specify a different prefix, you need to set the LD_LIBRARY_PATH
environment variable. This is a colon-separated list (like PATH
) which is typically not set. You’ll want something like this in your shell config:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/local/lib"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With