在Ubuntu 14.04上安装CUDA时的软件包依赖性问题


16

我试图按照此链接上的说明在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.

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


与`cuda相同:取决于:cuda-8-0(> = 8.0.61),但不会被安装`
–Sören18

Answers:


22

选项1:apt-get

  1. 安装未满足的依赖项

    sudo apt-get install cuda-runtime-7-0
    ...
    <more unmet dependencies>
    ....
    sudo apt-get install cuda-7-0
    
  2. 安装主包

    sudo apt-get install cuda
    

选项2:才能

  1. 安装能力

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

    sudo aptitude install cuda
    

我又得到了:以下软件包具有未满足的依赖性:cuda-7-0:依赖性:cuda-runtime-7-0(= 7.0-28)但不会被安装E:无法纠正问题,您已经掌握了破损的包裹。
欧姆

2
然后开始,sudo apt-get install cuda-runtime-7-0依此类推。或者,我尝试使用aptitude:安装CUDA sudo apt-get-install aptitude,然后安装sudo aptitude install cuda
AB

通过aptitude安装,最终我收到以下消息:处理时遇到错误:cuda-drivers cuda-runtime-7-0 cuda-7-0 cuda
欧姆

您可以发布更详细的错误消息吗?
AB

1
我已经删除了nvidia-opencl-icd- *,现在可以通过aptitude安装cuda。谢谢你们!
欧姆

2

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

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

然后安装cuda。

sudo apt-get install cuda

0

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

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.