首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Debian上安装CUDA工具包(11.5) (11)

在Debian上安装CUDA工具包(11.5) (11)
EN

Unix & Linux用户
提问于 2021-11-01 09:47:40
回答 4查看 6.1K关注 0票数 1

在Debian (11)上安装CUDA工具包(11.5)的说明组织得很好:Developer.nvidia.com/cuda-下载

但是,无论我尝试deb (本地)方法还是deb (网络)方法,我似乎都遇到了一个小的依赖问题。我的印象是,apt希望安装与nvidia相关的软件包的470版本,而应该安装495版本。

如果我运行sudo apt install cuda,那么我获得:

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cuda-drivers-495 : Depends: nvidia-driver (>= 495.29.05) but it is not going to be installed
                    Depends: libcuda1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvcuvid1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-allocator1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvidia-compiler (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvidia-encode1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-fbc1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-opticalflow1 (>= 495.29.05) but it is not going to be installed
                    Depends: libnvidia-ptxjitcompiler1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: libnvoptix1 (>= 495.29.05) but it is not going to be installed
                    Depends: libxnvctrl-dev (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-cuda-mps (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-detect (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-libopencl1 (>= 495.29.05) but 470.74-1 is to be installed
                    Depends: nvidia-opencl-common (>= 495.29.05)
                    Depends: nvidia-opencl-icd (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-smi (>= 495.29.05) but it is not going to be installed
                    Depends: nvidia-xconfig (>= 495.29.05) but 470.57.02-1 is to be installed
                    Depends: nvidia-modprobe (>= 495.29.05)
 libcufile-11-5 : Depends: liburcu6 but it is not installable
 nvidia-libopencl1 : Conflicts: libopencl1
                     Conflicts: libopencl1:i386
                     Recommends: nvidia-opencl-icd but it is not going to be installed or
                                 opencl-icd
 ocl-icd-libopencl1 : Conflicts: libopencl1
 ocl-icd-libopencl1:i386 : Conflicts: libopencl1
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

通过手动指定版本,我成功地安装了一些依赖项,例如sudo apt install nvidia-settings=495.29.05-1,但这似乎是一个没完没了的过程。

注意:如果我运行sudo apt-cache policy nvidia-driver,那么我获得:

代码语言:javascript
复制
nvidia-driver:
  Installed: (none)
  Candidate: 470.74-1
  Version table:
     495.29.05-1 500
        500 https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64  Packages
        500 file:/var/cuda-repo-debian11-11-5-local  Packages
     470.74-1 990
        990 http://deb.debian.org/debian testing/non-free amd64 Packages

有人知道我该怎么做吗?

目前,我的/etc/apt/ moment .列表如下:

代码语言:javascript
复制
deb https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /
# deb-src https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /
deb http://deb.debian.org/debian/ bookworm contrib
deb http://deb.debian.org/debian/ testing main contrib non-free

PS:我也尝试了"runfile (本地)“方法,但是在运行sudo sh cuda_11.5.0_495.29.05_linux.run并选择要安装的组件之后,我得到了”安装失败“,没有进一步的细节。

EN

回答 4

Unix & Linux用户

发布于 2022-01-09 23:07:28

我在Debian 12 (测试)上遇到了这个问题。我通过从.deb下载liburcu6的https://packages.debian.org/bullseye/liburcu6并用

代码语言:javascript
复制
sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb

在那之后,重新运行sudo apt-get -y install cuda运行得很好。没有深入了解为什么较新的Debian版本没有包括liburcu6。

票数 1
EN

Unix & Linux用户

发布于 2021-12-01 23:54:56

在运行安装之前退出xserver,这样nvidia-driver安装就不会失败。

代码语言:javascript
复制
sudo service lightdm stop

就能做到。

票数 0
EN

Unix & Linux用户

发布于 2022-01-18 06:03:13

我也有同样的问题,但最近发布的510.39.01和库达11-6;

代码语言:javascript
复制
/var/cuda-repo-debian11-11-6-local# dpkg -i nvidia-libopencl1_510.39.01-1_amd64.deb 
Selecting previously unselected package nvidia-libopencl1:amd64.
dpkg: regarding nvidia-libopencl1_510.39.01-1_amd64.deb containing nvidia-libopencl1:amd64:
 nvidia-libopencl1 conflicts with libopencl1
  ocl-icd-libopencl1:amd64 provides libopencl1 and is present and installed.

dpkg: error processing archive nvidia-libopencl1_510.39.01-1_amd64.deb (--install):
 conflicting packages - not installing nvidia-libopencl1:amd64
Errors were encountered while processing:
 nvidia-libopencl1_510.39.01-1_amd64.deb
代码语言:javascript
复制
# dpkg -l | grep liburcu6
ii  liburcu6:amd64                         0.12.2-1                           amd64        userspace RCU (read-copy-update) library

当然,如果我试图删除ocl-icd-libopencl1,我有大约50个依赖于它的包。我认为文森特已经研究过debian #755513这个bug,但这可能是一个新的问题。

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

https://unix.stackexchange.com/questions/675649

复制
相关文章

相似问题

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