4

I have been trying to install my NVIDIA driver, but when trying to change to change to proprietary driver, it gives me an error for unmet dependencies for driver 455. I have tried the command `sudo ubuntu-drivers autoinstall~ but i get met with

Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-455 : Depends: libnvidia-gl-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-decode-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-encode-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: xserver-xorg-video-nvidia-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-ifr1-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Depends: libnvidia-fbc1-455 (= 455.38-0ubuntu0.20.04.1) but it is not going to be installed
                     Recommends: libnvidia-compute-455:i386 (= 455.38-0ubuntu0.20.04.1)
                     Recommends: libnvidia-decode-455:i386 (= 455.38-0ubuntu0.20.04.1)
                     Recommends: libnvidia-encode-455:i386 (= 455.38-0ubuntu0.20.04.1)
                     Recommends: libnvidia-ifr1-455:i386 (= 455.38-0ubuntu0.20.04.1)
                     Recommends: libnvidia-fbc1-455:i386 (= 455.38-0ubuntu0.20.04.1)
                     Recommends: libnvidia-gl-455:i386 (= 455.38-0ubuntu0.20.04.1)
E: Unable to correct problems, you have held broken packages.

Right now, I just used sudo apt-get remove --purge nvidia-* -y So now I am left with no drivers at all. Any recommandations to get my GPU driver?

1
  • I had the same issue, and this answer gives a complete guide to removing all NVIDIA packages and starting again, which solved the issue for me. Oct 6, 2022 at 18:42

4 Answers 4

3

I agree with @helpless child on sudo apt purge libnvidia-gl-*.

In fact, it has been hard to find out the broken package dependencies and conflicts, and the versions often conflicts.

After some searching, I stitched up solutions into this:

sudo apt purge everything you find with the following commands: (sudo apt autoremove after if necessary)

dpkg -l | grep nvidia
dpkg -l | grep cuda
dpkg -l | grep libcudnn
dpkg -l | grep libglvnd0

You may not find them installed through autocomplete or wildcard character *, but you might see conflicting versions listed upon dpkg -l.

Then, install everything back from the drivers.

For instance, in my case:

sudo apt install nvidia-utils-460
sudo apt install nvidia-driver-460
sudo apt install cuda-toolkit-11-1
sudo apt install libcudnn8-dev=8.0.5.39-1+cuda11.1

Two most relevant references involved in the end:


P.S. It is somewhat confusing to have

  • cuda-11-1 vs cuda-toolkit-11-1 vs cuda-tools-11-1
  • nvidia-driver-460 vs nvidia-drivers-460 vs nvidia-graphics-drivers-460 (apt listed by cannot locate the latter two)
  • nvidia-cuda-dev, nvidia-cuda-toolkit, etc etc. :P
1

The solution for me was to manually remove every single CURRENT VERSION of the packages that have but it is not going to be installed status.

So I had driver version 440 and wanted 455. I had to remove sudo apt purge libnvidia-gl-440 and so on for all of them. After that the error went away and I could install 455.

0

I had the same issue with nvidia settings and unknown display. Therefore I got back to 450 driver with sudo apt install nvidia-450. This worked perfectly for me. If 450 drivers isn't working try 440.

It's funny that ubuntu-drivers devices shows me that 455 driver is recommended

vendor   : NVIDIA Corporation
model    : GP106 [GeForce GTX 1060 6GB]
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-455 - distro non-free recommended
driver   : nvidia-driver-450-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin
0

Instead of uninstalling those packages you can also inspect which packages are held and unhold them. After that you should be able to install the newer driver version.

Check held nvidia packages:

$ apt-mark showhold | grep nvidia
nvidia-compute-utils-460
nvidia-kernel-common-460
nvidia-kernel-source-460
nvidia-prime
nvidia-settings
nvidia-utils-460

Unhold packages that need to be updated:

$ sudo apt-mark unhold nvidia-compute-utils-460
Canceled hold on nvidia-compute-utils-460.
$ ...

After this, installing with apt worked for me.

You must log in to answer this question.

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