首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装CUDA 10.2后未满足的依赖项

安装CUDA 10.2后未满足的依赖项
EN

Ask Ubuntu用户
提问于 2019-12-12 01:05:04
回答 1查看 6.8K关注 0票数 2

我尝试使用apt安装Cuda10.2。安装过程中出现了一个错误。我能够直接安装运行.run文件从Nvidea网站。然而,当现在这样做时:

$ sudo apt upgrade

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 cuda-libraries-dev-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed
 cuda-samples-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed
 cuda-visual-tools-10-2 : Depends: libcublas-dev (>= 10.2.2.89) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

然后在做时:

代码语言:javascript
复制
$ sudo apt --fix-broken install

我得到:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libllvm7 libllvm7:i386 libnvidia-common-390 libwayland-client0:i386
  libwayland-server0:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libcublas-dev
The following NEW packages will be installed
  libcublas-dev
0 to upgrade, 1 to newly install, 0 to remove and 33 not to upgrade.
62 not fully installed or removed.
Need to get 0 B/42.3 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 file:/var/cuda-repo-10-2-local-10.2.89-440.33.01  libcublas-dev 10.2.2.89-1 [42.3 MB]
(Reading database ... 473743 files and directories currently installed.)
Preparing to unpack .../libcublas-dev_10.2.2.89-1_amd64.deb ...
Unpacking libcublas-dev (10.2.2.89-1) ...
dpkg: error processing archive /var/cuda-repo-10-2-local-10.2.89-440.33.01/./libcublas-dev_10.2.2.89-1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/nvblas.h', which is also in package nvidia-cuda-dev 9.1.85-3ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cuda-repo-10-2-local-10.2.89-440.33.01/./libcublas-dev_10.2.2.89-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

在做时:

代码语言:javascript
复制
$nvcc --version

我得到:

代码语言:javascript
复制
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

对如何修复破损的包裹有什么想法吗?

EN

回答 1

Ask Ubuntu用户

发布于 2019-12-12 01:30:31

好吧,我在网上找到了一个解决方案:

1)我将素数配置文件转换为英特尔。2)将cuda.list文件移到其他地方(我已经安装了10.2版本),3)在.bashrc中注释了一些行,其中指向cuda 10.2的路径(如果需要的话不确定) 4)重新引导$ sudo apt -fix-断开安装。

(这次成功了!)

6)在.bashrc中将素数配置文件切换回nvidia 7)未注释的行(反向步骤3) 8) $ .bashrc

而且起作用了。我现在已经安装了Cuda10.2,apt不再有中断的依赖关系。:-)

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1195549

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档