This question already has an answer here:

I have a clean install of Ubuntu MATE 18.04 that I wish to install TensorFlow on with GPU support. My GPU is a Titan X.

I am following the instructions from the GPU support guide but I am unable to install the NVIDIA driver due to broken packages. Here is the command and its output:

$ sudo apt-get install --no-install-recommends nvidia-driver-410
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 to resolve the situation:

The following packages have unmet dependencies:
 nvidia-driver-410 : Depends: xserver-xorg-video-nvidia-410 (= 410.104-0ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried resolving this by using aptitude in place of apt-get and accepting the proposed solution. However, upon reboot the system freezes at login. Since it was a clean install, I simply reinstalled the OS, and now I am back to this original problem.

How do I resolve the broken packages so I can install the driver for my GPU?

marked as duplicate by karel, Fabby, guiverc, Eric Carvalho, user535733 May 13 at 16:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Do NOT attempt to install a deprecated driver version! Follow the suggestion above to correct your software sources. Then add the graphics drivers PPA and then open Additional Drivers (Software & Updates), select and apply 418 or newer . And any guide suggesting the `--no-install-recommends" for no special reason shouldn't be trusted. – GabrielaGarcia May 13 at 8:37

The following commands were able to successfully install the latest NVIDIA drivers and complete the installation of TensorFlow with GPU support:

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

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