Ubuntu – Package dependency problem while installing CUDA on Ubuntu 14.04

cudanvidia

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?

Best Answer

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
    
Related Question