Error while loading shared libraries: libcublas.so.10.0: cannot open shared object file: No such file or directory

I have installed CUDA-10.0 in the remote server and exported the CUDA and Lib 64 paths as the root user. And then I can able to make all the samples without any error and then logged out.

After then I logged into my normal user account using ssh. I could compile a certain code with -lcublas flag but when I ran the executable file I got the error

error while loading shared libraries: libcublas.so.10.0: cannot open shared object file: No such file or directory

Then I export only the Lib64 path from my normal user account as given Linux post installation discussion

export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\
                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Then I can run the executable file successfully and getting correct output.

My question is

" What to do so that all the users can compile and run without every time exporting the paths from the normal user accounts?"

1 Like

They all need to set that environment variable. In a cluster environment this is often done through the module system. Type “man module” in linux. I’m sure there are other methods as well.

My variable

echo $LD_LIBRARY_PATH
/usr/local/cuda-10.2/lib:/usr/local/cuda-10.2/lib64:/usr/lib:/usr/local/cuda/targets/aarch64-linux/lib:/usr/lib:/usr/lib/aarch64-linux-gnu

already is set but I get that error. How can it be solved?

If you mean this error:

You cannot use CUDA 10.2 to satisfy a dependency on CUDA 10.0. You must use CUDA 10.0 and your LD_LIBRARY_PATH variable must point to a CUDA 10.0 install, not a CUDA 10.2 install.