我一直在尝试安装nvidia-cuda-toolkit
,sudo apt install nvidia-cuda-toolkit
它显示以下错误:
The following packages have unmet dependencies: nvidia-cuda-toolkit :
Depends: nvidia-cuda-dev (= 10.1.243-3) but it is not going to be
installed E: Unable to correct problems, you have held broken
packages.
Running `sudo apt install nvidia-cuda-dev` yields:
The following packages have unmet dependencies: nvidia-cuda-dev :
Depends: libcublas10 (= 10.1.243-3) but 10.2.2.214-1 is to be
installed
Recommends: libvdpau-dev but it is not going to be installed
Recommends: libnvcuvid1 but it is not installable E: Unable to correct problems, you have held broken packages.
我尝试从 NVIDIA 的官方网站安装它,但没有任何效果。
更新:输出sudo apt-cache show nvidia-cuda-dev
:
Package: nvidia-cuda-dev Architecture: amd64 Version: 10.1.243-3
Priority: extra Section: multiverse/libdevel Source:
nvidia-cuda-toolkit Origin: Ubuntu Maintainer: Ubuntu Developers
<[email protected]> Original-Maintainer: Debian
NVIDIA Maintainers <[email protected]> Bugs:
https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1100028
Depends: libcudart10.1 (= 10.1.243-3), libaccinj64-10.1 (=
10.1.243-3), libcuinj64-10.1 (= 10.1.243-3), libnvrtc10.1 (= 10.1.243-3), libnvtoolsext1 (= 10.1.243-3), libnvvm3 (= 10.1.243-3), libcublas10 (= 10.1.243-3), libcublaslt10 (= 10.1.243-3), libnvblas10
(= 10.1.243-3), libcufft10 (= 10.1.243-3), libcufftw10 (= 10.1.243-3),
libcurand10 (= 10.1.243-3), libcusolver10 (= 10.1.243-3),
libcusolvermg10 (= 10.1.243-3), libcusparse10 (= 10.1.243-3),
libnppc10 (= 10.1.243-3), libnppial10 (= 10.1.243-3), libnppicc10 (=
10.1.243-3), libnppicom10 (= 10.1.243-3), libnppidei10 (= 10.1.243-3), libnppif10 (= 10.1.243-3), libnppig10 (= 10.1.243-3), libnppim10 (=
10.1.243-3), libnppist10 (= 10.1.243-3), libnppisu10 (= 10.1.243-3), libnppitc10 (= 10.1.243-3), libnpps10 (= 10.1.243-3), libnvgraph10 (=
10.1.243-3), libnvjpeg10 (= 10.1.243-3), libcupti-dev (= 10.1.243-3), libnvidia-ml-dev (= 10.1.243-3), libthrust-dev Recommends: libcuda1
(>= 418.39) | libnvidia-tesla-cuda1 (>= 418.39) | libcuda.so.1 (>=
418.39) | libcuda-10.1-1, libgl1-mesa-dev | libgl-dev, libvdpau-dev, libnvcuvid1 Breaks: libcuda1 (<< 418.39) Filename:
pool/multiverse/n/nvidia-cuda-toolkit/nvidia-cuda-dev_10.1.243-3_amd64.deb
Size: 420308420 MD5sum: fbad3f84b31fe19a382ade63a57bc3ff SHA1:
ceb1f2e2bfdc6fafbeced70bbc707d3e9f83e6f5 SHA256:
85b188b198c53be4d24a9d706dce2252d1d4d69592691c90d4bfd0cabc04f720
Homepage: https://developer.nvidia.com/cuda-zone Description-en:
NVIDIA CUDA development files The Compute Unified Device Architecture
(CUDA) enables NVIDIA graphics processing units (GPUs) to be used for
massively parallel general purpose computation. . This package
contains the development files: headers and libraries.
Description-md5: 23a17262479fe7daf1cae67727e949c7
我也尝试关注这篇 Medium 文章。
我认为您可能已经添加了 PPA 或更改了“/etc/apt/sources.list”中的 sources.list。如果是这样,请首先尝试将您的 sources.list 恢复到其原始状态(对于 ubuntu 焦点),它应该类似于:
您的可能不完全相同,但只需确保所有镜子都属于 focus。
然后使用以下命令列出您的包源:
现在,如果您发现任何与 nvidia/cuda 相关的 PPA,请尝试使用以下命令将其删除:
然后尝试清除任何与 nvidia 或 cuda 相关的软件包
并确保 /usr/local/cuda 中没有 cuda 文件。如果是这样,请删除它们。最后,使用以下命令清理缓存并删除不需要的包:
现在再试一次,希望它会起作用:
我遇到了这个问题,无法从 nvidia-450 升级到 nvidia-455。删除旧驱动程序并重新安装修复它: