Debian(11)에 CUDA 툴킷(11.5) 설치

Debian(11)에 CUDA 툴킷(11.5) 설치

Debian(11)에 CUDA Toolkit(11.5)을 설치하는 방법은 다음과 같이 잘 정리되어 있습니다:개발자.nvidia.com/cuda-downloads.

하지만 deb(로컬) 방법을 사용하든 deb(네트워크) 방법을 사용하든 작은 종속성 문제가 발생하는 것 같습니다. 나는 NVIDIA 관련 패키지 버전을 apt설치하고 싶지만 대신 버전을 설치해야 한다는 인상을 받았습니다 .470495

실행하면 sudo apt install cuda다음을 얻습니다.

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다음을 얻습니다.

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/sources.list는 다음과 같습니다.

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

추신: "runfile (local)" 방법도 시도했지만 sudo sh cuda_11.5.0_495.29.05_linux.run설치할 구성 요소를 실행하고 선택한 후에는 자세한 내용 없이 "설치 실패" 메시지가 나타납니다.

답변1

나는 Debian 12(테스트)에서 이 문제에 직면했습니다. liburcu6의 .deb를 다운로드하여 문제를 해결했습니다. https://packages.debian.org/bullseye/liburcu6 그리고 설치해 보세요

sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb

그 후 재실행하니 sudo apt-get -y install cuda잘 되더군요. 최신 데비안 버전에 liburcu6이 포함되지 않은 이유에 대한 더 깊은 통찰력이 없습니다.

답변2

xservernvidia-driver설치 실패를 방지하려면 설치를 실행하기 전에 종료하십시오 .

sudo service lightdm stop

그렇게 할 것이다.

답변3

나는 같은 문제가 있지만 최근 릴리스 510.39.01 및 cuda 11-6에서 발생합니다.

/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
# dpkg -l | grep liburcu6
ii  liburcu6:amd64                         0.12.2-1                           amd64        userspace RCU (read-copy-update) library

물론, 제거하려고 하면 ocl-icd-libopencl1이에 의존하는 패키지가 약 50개 정도 생길 것입니다. Vincent가 이 버그 debian #755513을 수정했다고 생각하지만 이것은 새로운 문제일 수 있습니다.

답변4

liburcu6의 .deb를 다운로드하여 문제를 해결했습니다.https://packages.debian.org/bullseye/liburcu6그리고 설치해 보세요

sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb

언급된 페이지를 방문했지만 다음 스키마만 나열되었습니다.

Architecture    Package Size    Installed Size    Files
amd64           69.7 kB         366.0 kB          [list of files]
arm64           67.9 kB         342.0 kB          [list of files]
armel           62.7 kB         316.0 kB          [list of files]
armhf           63.1 kB         248.0 kB          [list of files]
i386            69.8 kB         348.0 kB          [list of files]
mips64el        62.0 kB         341.0 kB          [list of files]
mipsel          62.2 kB         326.0 kB          [list of files]
ppc64el         72.0 kB         610.0 kB          [list of files]
s390x           67.2 kB         342.0 kB          [list of files]

amd64용이 필요합니다(Intel CPU도 이 아키텍처를 사용합니다). 어떡해?

관련 정보