Nvidia CUDA 安装问题 缓存损坏

Nvidia CUDA 安装问题 缓存损坏

在命令上$ sudo apt-get install cuda


Reading package lists... Done
Building dependency tree       
Reading state information... Done
cuda is already the newest version.
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


Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer     required:
  linux-image-generic
    Use 'apt-get autoremove' to remove it.
    The following extra packages will be installed:
  nvidia-opencl-icd-346
The following NEW packages will be installed:
  nvidia-opencl-icd-346
0 upgraded, 1 newly installed, 0 to remove and 57 not upgraded.
30 not fully installed or removed.
Need to get 0 B/7,829 kB of archives.
After this operation, 26.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 293998 files and directories currently installed.)
Preparing to unpack .../nvidia-opencl-icd-346_346.72-0ubuntu0~xedgers14.04.2_amd64.deb ...
Unpacking nvidia-opencl-icd-346 (346.72-0ubuntu0~xedgers14.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-opencl-icd-346_346.72-0ubuntu0~xedgers14.04.2_amd64.deb (--unpack):
 trying to overwrite '/etc/OpenCL/vendors/nvidia.icd', which is also in     package nvidia-opencl-icd-331-updates 331.113-0ubuntu0.0.4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-opencl-icd-346_346.72-0ubuntu0~xedgers14.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)



我在安装 CUDA 时尝试安装 Nvidia 的驱动程序和 CUDA。它显示缓存损坏,我无法使用给定的命令修复它。



答案1

最好遵循 NVIDIA 的官方文档。要在笔记本电脑上安装 CUDA,请按照以下步骤操作指导

相关内容