I tried to follow the instructions on this link to install CUDA on Ubuntu 14.04, but on this step I got package dependency problem:

~/Downloads$ sudo apt-get install cudaReading 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:
 cuda : Depends: cuda-7-0 (= 7.0-28) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Does someone know what could be the problem?

  • Same with ` cuda : Depends: cuda-8-0 (>= 8.0.61) but it is not going to be installed `
    – Soerendip
    Sep 17, 2018 at 23:29

5 Answers 5


Option 1: apt-get

  1. Install unmet dependencies

    sudo apt-get install cuda-runtime-7-0
    <more unmet dependencies>
    sudo apt-get install cuda-7-0
  2. Install main package

    sudo apt-get install cuda

Option 2: aptitude

  1. Install aptitude

    sudo apt-get install aptitude
  2. Install main package

    sudo aptitude install cuda
  • I got again: The following packages have unmet dependencies: cuda-7-0 : Depends: cuda-runtime-7-0 (= 7.0-28) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
    – Ohm
    Mar 19, 2015 at 12:25
  • 3
    Then start with sudo apt-get install cuda-runtime-7-0 and so on. As an alternative, I'd try to install CUDA with aptitude: sudo apt-get-install aptitude and then sudo aptitude install cuda.
    – A.B.
    Mar 19, 2015 at 14:43
  • installing via aptitude I got the following message by the end:Errors were encountered while processing: cuda-drivers cuda-runtime-7-0 cuda-7-0 cuda
    – Ohm
    Mar 23, 2015 at 11:07
  • Can you post a more detailed error message?
    – A.B.
    Mar 23, 2015 at 11:11
  • 1
    I have removed nvidia-opencl-icd-* and now I was able to install cuda by aptitude. Thanks guys!
    – Ohm
    Mar 24, 2015 at 6:34

In my case, all the above solutions does not work because of libnvidia depencencies. Here are my solutions:

sudo apt-get purge nvidia*
sudo apt-get purge libnvidia*
sudo apt-get purge cuda*
sudo apt-get autoremove
sudo apt-get autoclean
  • sudo apt-get purge libnvidia* helped me in 2022 with the error cuda : Depends: cuda-11-6 (>= 11.6.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
    – Fleks
    May 1, 2022 at 12:45

It seems that you have installed certain nvidia drivers or deficient cuda toolkit previously, like some contradictory versions from the ubuntu's repository, so you should remove them firstly.

sudo apt-get purge nvidia-*
sudo apt-get autoremove

and then install cuda.

sudo apt-get install cuda
  • 2
    This will break all your graphics drivers. I would not recommend this option.
    – Daniel
    Nov 9, 2020 at 5:40
  • Surprisingly, reinstalling the graphics drivers did solve the issue for me
    – Max
    Oct 25, 2021 at 17:29

This happened to me when I tried to install Cuda on Ubuntu 20.04 which runs from a flash disk (The installation flash disk which is created from iso). The solution was:

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev

I have taken it from here

When I tried to install Cuda on an hard drive installation, the problem did not recreate.


Current GNOME integration with CUDA driver seems to have problems (v 346.46). I had a problem with login session init, but managed to solve it by installing lxde and removing gnome and ubuntu-desktop as described here: caffe installation problems

You must log in to answer this question.

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