How to install libcudnn.8 Ubuntu 20.04 NVIDIA-SMI 460.56 Driver Version: 460.56 CUDA Version: 11.2

How to install libcudnn8?
. TensorFlow is generating error message and I cannot find the package via
ldconfig -p | grep libcudnn

Got it:
Followed this python - "Could not load dynamic library 'libcudnn.so.8'" when running tensorflow on ubuntu 20.04 - Stack Overflow
Steps are:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/${last_public_key}.pub
or
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub ← in my case
sudo add-apt-repository β€œdeb Index of /compute/cuda/repos/ubuntu2004/x86_64 /”
sudo apt-get update
sudo apt-get install libcudnn8
sudo apt-get install libcudnn8-dev

1 Like