As instruções para instalar o CUDA Toolkit (11.5) no Debian (11) estão bem organizadas aqui:desenvolvedor.nvidia.com/cuda-downloads.
Mas pareço ter um pequeno problema de dependência, quer eu tente o método deb (local) ou o método deb (rede). Minha impressão é que apt
deseja instalar as 470
versões dos pacotes relacionados à nvidia, mas deveria instalar as 495
versões.
Se eu correr sudo apt install cuda
, obtenho:
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.
Consegui instalar algumas dependências especificando a versão manualmente, por exemplo, sudo apt install nvidia-settings=495.29.05-1
mas isso parece um processo interminável.
Nota: Se eu executar sudo apt-cache policy nvidia-driver
, obtenho:
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
Alguém sabe como devo proceder?
No momento meu /etc/apt/sources.list é o seguinte:
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: Também tentei o método "runfile (local)", mas depois de executar sudo sh cuda_11.5.0_495.29.05_linux.run
e selecionar os componentes a serem instalados, recebo "Falha na instalação" sem mais detalhes.
Responder1
Enfrentei esse problema no Debian 12 (testes). Eu consertei baixando o .deb para liburcu6 em https://packages.debian.org/bullseye/liburcu6 e instalá-lo com
sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb
Depois disso, a reexecução sudo apt-get -y install cuda
funcionou bem. Não mergulhei mais profundamente para ver por que as versões mais recentes do Debian não incluem liburcu6 nelas.
Responder2
Saia xserver
antes de executar a instalação para que a nvidia-driver
instalação não falhe.
sudo service lightdm stop
faria isso.
Responder3
Tenho o mesmo problema, mas com a versão recente 510.39.01 e 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
Claro que se eu tentar remover ocl-icd-libopencl1
, tenho cerca de 50 pacotes que dependem disso. Acho que Vincent já havia trabalhado nesse bug debian #755513, mas isso pode ser um problema novo.
Responder4
Eu consertei baixando o .deb para liburcu6 emhttps://packages.debian.org/bullseye/liburcu6e instalá-lo com
sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb
Visitei a página mencionada, mas apenas as seguintes arquiteturas estão listadas:
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]
Preciso de um para AMD64 (CPUs Intel também usam essa arquitetura). O que posso fazer?