[Linux] Fix to Rust lang object lib error

I am starting to learn about Rust, the programming language by Mozilla, it has a lot of guides now to get started. So, why not?

I installed Manjaro a few days ago, everything is great, I continue installing and migrating everything from my before system (Ubuntu). Ubuntu was OK but I expect never back again to it, I will tell you the reason later in other post, I promise :)

When I installed Rust on Ubuntu everything went right, clean installation and robus usage. But now that I migrate to Manjaro I am getting an error when I run rustc on my shell:

rustc: error while loading shared libraries: librustc_driver-4e7c5e5c.so: cannot open shared object file: No such file or directory

There are two fixes for this, feel free to use the one you think is better in your case.

Fix 1

Add the following line to your ~/.bashrc, ~/.zshrc or whatever shell you use:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

Fix 2

Create the file /etc/ld.so.conf.d/rust.conf with the following content:


Then execute the next command as root.


Now enjoy your Rust Language installation!