18

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 ` – Sören Sep 17 '18 at 23:29
26

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
    
| improve this answer | |
  • 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 '15 at 12:25
  • 2
    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 '15 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 '15 at 11:07
  • Can you post a more detailed error message? – A.B. Mar 23 '15 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 '15 at 6:34
2

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
| improve this answer | |
0

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

| improve this answer | |
0

This happened to 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.

| improve this answer | |

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.