I followed the steps in:

https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html to set up cudnn.

Everything seems to be working fine but when I executed "make clean && make", I got the warning shown in the title and no mnistCUDNN was created.

Somebody suggested setting the CUDA_PATH using: export CUDA_PATH=/usr/local.cuda-9.0

but it does not work. I also tried:

sudo ln -s /usr/local/cuda-9.0/ /usr/local/cuda-9.0

but same issue. Then, I tried:

sudo ln -s /usr/local/cuda-9.0/ /usr/local/cuda

Again, same issue.

I also executed the following line as somebody mentioned:

cat /usr/include/x86_64-linux-gnu/cudnn_v7.h | grep CUDNN_MAJOR -A 2

but I still get:

make clean && make rm -rf *o rm -rf mnistCUDNN /usr/bin/ld: -lcublas cannot be found collect2: error: ld returned 1 exit status

WARNING - FreeImage is not set up correctly. Please ensure FreeImage is set up correctly. <<< : : :

Doing "sudo dpkg -i libcudnn7*.deb" and repeat Sec 2.4 Verifying cuDNN is installed resulted in the same error.

Executing: nvcc --version

leds to "Command 'nvcc' not found, but can be installed with:

sudo apt install nvidia-cuda-toolkit"

Not sure if I need to do that.

Could you please help to resolve the issue?

Also, I am concerned that I might set the wrong path and make the wrong symbolic links. Please let me know how to undo the above three lines of command that don't work.

1 Answer 1


Installing the library fixed this for me

sudo apt-get install libfreeimage3 libfreeimage-dev

I found the solution here...


Regarding the second part of your question for nvcc...

I'm sure you added the PATH correctly per the install guide, but if you reboot then the PATH will be reset. You'll need to add it to ~./bashrc or one of the many other options described here:

https://stackabuse.com/how-to-permanently-set-path-in-linux/ "How to Permanently Set $PATH in Linux" By Tendai Mutunhire

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .