在Ubuntu 14.04上安装CUDA时的程序包依赖性问题

我尝试按照此链接上的说明在Ubuntu 14.04上安装CUDA,但在此步骤中我遇到了包依赖问题:

~/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. 

有人知道可能是什么问题吗?

选项1:apt-get

  1. 安装未满足的依赖项

     sudo apt-get install cuda-runtime-7-0 ...  .... sudo apt-get install cuda-7-0 
  2. 安装主包

     sudo apt-get install cuda 

选项2:能力倾向

  1. 安装aptitude

     sudo apt-get install aptitude 
  2. 安装主包

     sudo aptitude install cuda 

您之前似乎已经安装了某些nvidia驱动程序或缺少cuda工具包,比如来自ubuntu存储库的一些相互矛盾的版本,因此您应该首先删除它们。

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

然后安装cuda。

 sudo apt-get install cuda 

当前GNOME与CUDA驱动程序的集成似乎存在问题(第346.46节)。 我遇到了登录会话init的问题,但设法通过安装lxde并删除gnome和ubuntu-desktop来解决它,如下所述: caffe安装问题