The NVIDIA CUDA Deep Neural Network library (cuDNN) is a GPU-accelerated library for deep learning computations.
cuDNN provides highly optimized implementations of standard deep learning operations, including forward and backward convolution, attention mechanisms, matrix multiplication, pooling, and normalization.
cuDNN documentation (honestly, it is not particularly useful for what we are doing here):
https://docs.nvidia.com/deeplearning/cudnn/installation/latest/
That is the official introduction.
I assume that anyone who needs cuDNN probably already knows what it is used for, so let’s skip the unnecessary explanation and get straight to the installation.
This guide uses Fedora 42 as the example environment.
Last updated: 2025-11-06
Install Dependencies
First, we need to install zlib.
Run:
sudo dnf install zlib zlib-devel
In practice, Fedora should install something called zlib-ng-compat.
It is essentially the newer implementation providing compatibility with zlib.
Download and Extract the Tarball
Next, we need to download the cuDNN tarball.
Why not install it through the package manager?
Because NVIDIA does not provide the package for Fedora.
To be fair, this may also be related to Fedora’s policies, since cuDNN is non-free software and may be restricted by Fedora’s packaging guidelines.
Fortunately, installing cuDNN is basically just a matter of copying a set of files into the appropriate directories.
So in practice, this is not a major problem.
The main thing to keep in mind is that because the files are installed manually, you need to know what was installed if you want to manage or remove them later.
Download the files with the following commands:
# Create a directory first
mkdir cudnn
# Move into the directory
cd cudnn
# Download the tarball
wget https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-9.15.0.58_cuda13-archive.tar.xz
Then extract the archive:
tar -xvf cudnn-linux-x86_64-*.tar.xz
Installation
Next, copy the required files:
cd cudnn-linux-x86_64-9.15.0.58_cuda13-archive
sudo cp include/cudnn*.h /usr/local/cuda/include/
sudo cp -P lib/libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
Once the files have been copied, the installation is essentially complete.
Next, verify the installation.
Verify the Installation
Use the following command to check the installed cuDNN version:
cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 3
As long as the version information is displayed without any errors, the installation should be working correctly.
The cuDNN installation is now complete.