Unable to verify cuDNN installation on linux (ubuntu 20.04)

I’m following this guide to install cudnn.

I’ve able to perform instruction give under “ Ubuntu Network Installation” section

I’m getting the following error when I’m trying to perform instruction give under “2.4. Verifying The Install On Linux” section for verifying installation.

cd: /home/e/cudnn_samples_v8/mnistCUDNN: No such file or directory

Inside my /usr/src/cudnn_samples_v8 directory I only have one file “NVIDIA_SLA_cuDNN_Support.txt”

Installed cudnn and cuda versions are as follows


Are you still facing this issue.
Which method of installation are you following. Could you run successfully prior steps as mentioned in the docs without any error ?

Thank you.


As I mentioned, I followed " Ubuntu Network Installation” section

Yes. & if I try to reinstall it says : “libcudnn8 is already the newest version (

I believe the issue I’m facing is related to “2.4. Verifying The Install On Linux” section.

When I perform the 2nd step of the verification-procedure. “Go to the writable path.
It says:

bash: cd: /home/e/cudnn_samples_v8/mnistCUDNN: No such file or directory

So I believe mnistCUDNN is missing from the setup. or not being included anymore.

Thank you.


Are you still facing this issue


I have the same issue, do you have any kind of solution? I have performed multiples time the installation steps…

I have the same Issue too , did anyone find a solution for it ? Note : I used the .tar file Installation

The same here, I followed the steps but there is only the file NVIDIA_SLA_cuDNN_Support.txt.

But now I tried to install dlib which CUDA support and it was found!

Found CUDA: /usr (found suitable version "11.5", minimum required is "7.5")

But it reaised another issue that I’ll handle now.

*** CUDA was found but your compiler failed to compile a simple CUDA program so dlib isn't going to use CUDA.

Same issue here. Any update?

I have followed the installation instruction for the Ubuntu Network Installation as well as 1.3.1. Tar File Installation and eventually the Debian installation. When it get to installing the library it says:

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package libcudnn8-samples is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version ‘8.x.x.x-1+cudaX.Y~’ for ‘libcudnn8-samples’ was not found

Cant Nvidia just put the sample code to github just like you did with the CUDA toolkit sample codes? Why all the hoop-jumping. And from what I’ve seen this is not a singular issue, a lot of people is having issue locating and finding the cudnn sample codes.


First I installed Ubuntu 22.10 and for my happiness I noticed the SO had finally recognized my Geforce RTX 3070 Ti Laptop in all monitoring tools, including:

sudo lshw -c video
ubuntu-drivers devices
inxi -F
lspci -k | egrep -A 3 -i “vga|display|3d”

It wasn’t been recognized in Ubuntu 22.04 LTS. Even the wifi was recognized at the end of the installation. The nvidia toolkit (nvidia-smi, …) was automatically installed too. :)

Then I’ve followed this Installing dlib using conda with CUDA enabled · GitHub

I’ve aborted the first installation because it complained about the lack of a package and I’ve decided to install it first and them restart the installation process.

sudo nala install libopenblas-dev liblapack-dev

When it finished I could see the expected messages.

– Found CUDA: /home/…/miniconda3/envs/CV (found suitable version “12.0”, minimum required is “7.5”)
– Found cuDNN: /home/…/miniconda3/envs/CV/lib/libcudnn.so

Up to now I think changing to Ubuntu 22.10 was a good choice.

That is what I did. Good luck!

You can install with:

sudo apt-get update && sudo apt-get upgrade
sudo apt purge '*nvidia*'
sudo apt-get remove --purge '^nvidia-.*'


wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda gds libcudnn8 libcudnn8-dev tensorrt
sudo gedit .bashrc
export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Save it.

source ~/.bashrc

Reboot and enjoy it!

Thanks for all for replying. I finally found out the issue.

it has to do with the way you install the cuDNN, the sample code are only available if you are doing it with debian install (1.3.2)

it will not be included if you do it with the tar file you download from nvidia, neither would it work if you install it from Package Manager (sudo apt install)

the previous 2 methods will only install libcudnn8 and libcudnn8-dev packages, but not the libcudnn8-samples you need

so you can install the libraries with whatever method you want, but you will need to follow 1.3.2 of the cudnn install guide to get the libcudnn8-samples

also only cuda12.0 is available and not cuda12.1, so for e.g.
sudo apt-get install libcudnn8-samples=

(i wish they do include it for package manager/tar at least, would make it much easier)

1 Like

Hi Guys:

If you have the sample in a second computer (or peer’s computer), you can copy cudnn_samples_v8 onto your targeted computer.

1. Move it to /usr/src

$ sudo mv /home/user/Downloads/cudnn_samples_v8 /usr/src/

2. Copy the cuDNN samples to a writable path

$ cp -r /usr/src/cudnn_samples_v8/ $HOME

3.Go to the writable path

$ cd $HOME/cudnn_samples_v8/mnistCUDNN

4. Compile the sample

$ make clean && make

5. Run the sample

$ ./mnistCUDNN

Test passed!