0

Today on Ubuntu 18.04.5 I tried to update the nvidia driver using sudo ubuntu-drivers install which led to the following output:

Reading package lists... Done
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 resolve the situation:

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

I then ran sudo ubuntu-drivers list and got the following output:

nvidia-driver-435
nvidia-driver-440-server
nvidia-driver-418-server
nvidia-driver-450-server

Anyone have any clue why it is trying to install a server version of the driver? I already have a normal nvidia driver installed and working fine.

Also, I noticed the following weirdness: sudo apt-cache depends nvidia-driver-440 output:

nvidia-driver-440
  Depends: nvidia-driver-450

Why would an old driver depend on a new driver? Seems totally wrong to me. Is this NVidia's weird way of forcing people to upgrade their driver or something?

7
  • Good point, when I run sudo apt install --fix-broken however, everything seems fine. Removing and installing firefox goes smoothly. Running dpkg -l | grep ^..r as suggested elsewhere in this forum also produces no issues. – Ian Colwell Oct 2 '20 at 19:56
  • I installed nvidia 450 from ppa and don't have this behavior. One package installed in 440 version : it is the nvidia-setting-440 package. Did you install from ppa ? – Oli Oct 3 '20 at 7:34
  • By ppa, you mean a custom NVidia ppa? not the typical ubuntu main/universe ppas? The only other ppa I have installed is http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 from installing cuda – Ian Colwell Oct 5 '20 at 14:13
  • I mean this ppa : launchpad.net/~graphics-drivers/+archive/ubuntu/ppa – Oli Oct 6 '20 at 15:09
  • Nope, I don't have that ppa on my "Other Software" tab in "Software & Updates". I have the main, universe, restricted, and multiverse sources enabled on the "Ubuntu Software" tab though. – Ian Colwell Oct 9 '20 at 18:52
0

I don't know where why you have this this bug the the recommended installation is from the ppa.

Try to install the latest version from ppa :

$ sudo add-apt-repository ppa:graphics-drivers
$ sudo apt-get update
$ sudo ubuntu-drivers autoinstall

Check the proposed drivers with :

$ sudo ubuntu-drivers devices

If the 455 is the recommended version run :

$ sudo ubuntu-drivers autoinstall

Alternatively, install desired driver selectively using the apt command. For example:

$ sudo apt install nvidia-450

If you have some trouble, purge the old installation before installing new driver :

$ sudo apt purge nvidia-*

Source : https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

1
  • When I try to add the ppa:graphics-drivers it results in the following warning: "This PPA is currently in testing, you should be experienced with packaging before you dive in here:", so I don't think I want to go there. Anyway, thanks for your help! it seems like the best way to install nvidia drivers is with sudo apt install nvidia-*. I was hoping the ubuntu-drivers tool/command was mature enough to just install the latest driver without worrying about which version is latest (for scripting purposes), but maybe it's still too early to rely on it. – Ian Colwell Jan 19 at 17:22
0

You tried to run the wrong command. The correct command to run is as follows:

sudo apt ubuntu-drivers autoinstall
sudo reboot   

The autoinstall command of ubuntu-drivers installs drivers that are appropriate for automatic installation including their dependencies.

The E: Unable to correct problems, you have held broken packages. error message could also be caused by a PPA that you have added to your software sources if sudo apt ubuntu-drivers autoinstall doesn't work.

2
  • sudo apt ubuntu-drivers autoinstall this is wrong, did you mean sudo ubuntu-drivers autoinstall? Regardless, the install and autoinstall verbs both seem to do the same thing. – Ian Colwell Jan 19 at 17:16
  • It's not wrong and I did mean exactly ubuntu-drivers autoinstall. The autoinstall command of ubuntu-drivers selects and installs drivers that are appropriate for automatic installation including their dependencies.For more information search Ask Ubuntu or Google for ubuntu-drivers autoinstall or visit How to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux. – karel Jan 19 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.