Unable to locate package libcudnn8 in Ubuntu 18.04
7,242
Certain things like the CPU drivers are preconfigured for you in Docker, but the GPU is not configured when you run a Docker container. Read How to Properly Use the GPU within a Docker Container.
There is no package named libcudnn8 in the default Ubuntu 18.04 repositories, so remove the references to libcudnn8 and prune the command as follows:
sudo apt update && rm -rf /var/lib/apt/lists/*
sudo add-apt-repository multiverse
sudo apt update
sudo apt install nvidia-cuda-toolkit
sudo reboot
If you don't have the proprietary Nvidia graphics driver installed yet, please run this command sudo ubuntu-drivers autoinstall && sudo reboot
before you run sudo apt install nvidia-cuda-toolkit
Author by
DDN
Updated on September 18, 2022Comments
-
DDN over 1 year
When I tried to install
sudo apt-get update && apt-get install -y --no-install-recommends libcudnn8=$CUDNN_VERSION-1+cuda11.0 && apt-mark hold libcudnn8 && rm -rf /var/lib/apt/lists/*
, I got the error:Unable to locate package libcudnn8
-
DDN over 3 yearsAs you suggested I pruned that command, after this command all the packages are up to date. What will be the next step to install nvidia/cuda for ubuntu 18.04
-
karel over 3 years@DDN I added my reply to your comment to my answer.
-
karel over 3 yearsIf you don't have the proprietary Nvidia graphics driver installed yet, please run this command
sudo ubuntu-drivers autoinstall && sudo reboot
before you runsudo apt install nvidia-cuda-toolkit
-
DDN over 3 yearsnow I got another error E: Unable to locate package nvidia-cuda-toolkit
-
karel over 3 yearsPlease read my latest revision.
-
DDN over 3 yearsYes, I have followed the steps but still got the same error E: Unable to locate package nvidia-cuda-toolkit
-
karel over 3 yearsPlease add multiverse repository which provides nvidia-cuda-toolkit .
-
DDN over 3 yearsDear karel, multiverse repository Ubuntu Software options were not ticked properly. Now, I have successfully installed all the packages. Thanks a lot for helping me.
-
karel over 3 years@DDN If this answered your question please click the gray checkmark beside this answer to mark it as accepted. The checkmark will change colors from gray to green when it is clicked.