6

I was working with CUDA5.5, however I wanted to install CUDA6.5 using the main repository given by nvidia.

sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb 
sudo apt-get update

But when I try to install cuda I get the following error.

sudo apt-get install cuda

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:
 cuda : Depends: cuda-6-5 (= 6.5-14) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I would appreciate any help.

4 Answers 4

7

Same error message with me, but none of the above answers helped in my case (Ubuntu 14.10). Therefore, first dissect the error message. It says:

The following packages have unmet dependencies:
cuda : Depends: cuda-6-5 (= 6.5-14) but it is not going to be installed.

So cuda has a dependency cuda-6-5, which can not be installed. Why? Let's check: sudo apt-get install cuda-6-5 produced a similar message to the original one for me saying something like:

The following packages have unmet dependencies:
cuda-6-5 : Depends: libcudart6.0 (=....) but it is not going to be installed.

So libcudart6.0 is the problem. Let's check why: sudo apt-get install libcudart6.0 results in:

The following packages have unmet dependencies:
libcudart6.0 : Depends: nvidia-340 (=....) but it is not going to be installed.

So this is the problem: The installed NVIDIA driver (and also those available in the repository) are not recent enough. Adding the xorg-edgers PPA helps:

sudo add-apt-repository ppa:xorg-edgers/ppa 
sudo apt-get update

Running the original sudo apt-get install cuda now works.

(This may not be a problem, if one runs the *.run file from the NVIDIA developer website.)

4

From the terminal run:

sudo apt-get remove nvidia-cuda-*  # remove old nvidia-cuda packages
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb 
sudo apt-get update
sudo apt-get install cuda

Some actions must be taken after installing the CUDA Toolkit and Driver before they can be completely used. Perform the post-installation actions.

Reference: NVIDIA CUDA Getting Started Guide for Linux v6.5

1

I had similar problem, for me it helped to make sure all other cuda and libcuda packages are removed.

List them with:

dpkg -l | grep cuda

If the list shows something, remove it with:

sudo apt-get remove <something>

After that install with the usual steps

sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
sudo apt-get update
sudo apt-get install cuda

Hope it helps.

0
0

I encountered the same problem when upgrading from Ubuntu 12.04 to 14.04 and CUDA. I tried the above solutions, none of the packages listed was installed.

I solved it by removing nvidia-libopencl-* and nvidia-opencl-* packages.

0

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.