我尝试使用“附加驱动程序”控制面板安装推荐的 Nvidia 驱动程序。这导致根据 安装了 CUDA nvidia-smi
,但缺少 cuda.h。通常我会通过安装nvidia-cuda-dev
或来获取它nvidia-cuda-toolkit
,但现在这些软件包与 nvidia-driver 冲突,因此它们不能同时安装:
The following packages will be REMOVED
libnvidia-compute-515 libnvidia-compute-515:i386 libnvidia-decode-515 libnvidia-decode-515:i386 libnvidia-encode-515 libnvidia-encode-515:i386 nvidia-compute-utils-515 nvidia-driver-515 nvidia-utils-515
The following NEW packages will be installed
libaccinj64-11.5 libcub-dev libcublas11 libcublaslt11 libcudart11.0 libcufft10 libcufftw10 libcuinj64-11.5 libcupti-dev libcupti-doc libcupti11.5 libcurand10 libcusolver11 libcusolvermg11 libcusparse11 libnppc11 libnppial11
libnppicc11 libnppidei11 libnppif11 libnppig11 libnppim11 libnppist11 libnppisu11 libnppitc11 libnpps11 libnvblas11 libnvidia-compute-495 libnvidia-compute-510 libnvidia-ml-dev libnvjpeg11 libnvrtc-builtins11.5 libnvrtc11.2
libnvtoolsext1 libnvvm4 libthrust-dev libvdpau-dev node-html5shiv nsight-compute nsight-compute-target nsight-systems nsight-systems-target nvidia-cuda-dev nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-cuda-toolkit-doc nvidia-opencl-dev
nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev opencl-c-headers opencl-clhpp-headers
答案1
我也遇到了这个冲突问题,通过安装 Nvidia 驱动程序 510 版本解决了它。
或者,您可以手动安装 CUDA 工具包,而不是使用 apt-get 来继续使用版本 515:https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html