如何在Ubuntu 14.04上安装CUDA-6.5?

我正在使用CUDA5.5,但我想使用nvidia提供的主存储库安装CUDA6.5。

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

但是当我尝试安装cuda时,我收到以下错误。

 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. 

我将不胜感激任何帮助。

从终端运行:

 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 

安装CUDA Toolkit和Driver之后必须采取一些措施才能完全使用它们。 执行安装后操作 。

参考: 适用于Linux v6.5的NVIDIA CUDA入门指南

与我相同的错误消息,但上述答案都没有帮助我(Ubuntu 14.10)。 因此,首先剖析错误消息。 它说:

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

所以cuda有一个依赖cuda-6-5 ,无法安装。 为什么? 让我们检查一下: sudo apt-get install cuda-6-5给我发了一条类似的信息给我说的话:

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

所以libcudart6.0就是问题所在。 让我们来看看为什么: sudo apt-get install libcudart6.0导致:

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

所以这就是问题:安装的NVIDIA驱动程序(以及存储库中可用的驱动程序)还不够新。 添加xorg-edgers PPA有助于:

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

运行原始的sudo apt-get install cuda现在可以运行了。

(如果从NVIDIA开发者网站运行*.run文件,这可能不是问题。)

我有类似的问题,对我而言,它有助于确保删除所有其他cuda和libcuda包。

列出他们:

 dpkg -l | grep cuda 

如果列表显示某些内容,请将其删除:

 sudo apt-get remove  

之后用通常的步骤安装

 sudo dpkg -i cuda-repo-__.deb sudo apt-get update sudo apt-get install cuda 

希望能帮助到你。

从Ubuntu 12.04升级到14.04和CUDA时遇到了同样的问题。 我尝试了上述解决方案,没有列出所列的软件包。

我通过删除nvidia-libopencl-*nvidia-opencl-*包解决了这个问题。