Ubuntu 14.04:安装 cuda 7

Ubuntu 14.04:安装 cuda 7

我正在遵循这里给出的程序:
http://www.r-tutor.com/gpu-computing/cuda-installation/cuda6.5-ubuntu

然而,我这样做之后sudo apt-get install cuda收到以下消息:

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
cuda-drivers : Depends: nvidia-opencl-icd-346 (>= 346.46) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


输入后sudo apt-get -f install我收到以下消息:

Preparing to unpack .../nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb ...
Unpacking nvidia-opencl-icd-346 (346.46-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/etc/OpenCL/vendors/nvidia.icd', which is also in package nvidia-opencl-icd-331 331.113-0ubuntu0.0.4
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-opencl-icd-346_346.46-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

http://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#axzz3VF4pSfRr
要求移除该包裹。

这个怎么做 ?

pssudo apt-get install cuda-runtime-7-0出现同样的错误。

答案1

运行以下命令后,我成功让它工作了:

sudo apt-get clean  
sudo apt-get autoclean  
sudo apt-get autoremove  
sudo apt-get install -f  

答案2

我可以先使用nvidia-opencl-icd-*以下命令搜索文件来消除此错误:

sudo find / -name nvidia-opencl-icd-\*

然后我删除了所有带有以下前缀的文件

nvidia-opencl-icd-\*

然后运行:

sudo apt-get -f install

相关内容