Error while loading shared library cuFFT, cuda 9.1

I’m a beginner trying to learn cuda. After installation, I was trying to compile and run all the sample programs. All programs seem to compile fine, But some don’t execute. It seems like the cuFFT library hasn’t been linked/installed properly. So any program with that dependency doesn’t execute. I get the following error:

./convolutionFFT2D: error while loading shared libraries: libcufft.so.9.1: cannot open shared object file: No such file or directory

Can anyone help me with this issue? Since I would also like to install and run tensorflow, I would like to avoid any issue related to the cuda install.

My system is running on fedora 27. I have installed nvidia driver version 390.25. I am using the cuda-g++ compiler for compiling the programs.

You need to make sure you have updated the LD_LIBRARY_PATH environment variable correctly. Refer to the mandatory post-install actions in the linux install guide.

Thanks a lot for your help! It seems to be fine now. I had set the variable as :

export LD_LIBRARY_PATH=/usr/local/cuda/lib

All programs other than the ones using cuFFT were working fine with it. Setting the path as the following:

export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64
{LD_LIBRARY_PATH:+:{LD_LIBRARY_PATH}}

has solved the issue, but I get the following prompt whenever I login as root:

-bash: export: `:/usr/local/cuda-9.1/lib64’: not a valid identifier

Your export command was not correctly formed then. You should use lib64, not lib, usually.

Rather than use the complex syntax in the install guide, I usually use something simpler such as:

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

that usually works. The exact need here will depend on what else is going on in your system as well as possibly the distro you are using.

Thanks for the tip! I tried your syntax, and the prompt doesn’t show up anymore.