Las instrucciones para instalar CUDA Toolkit (11.5) en Debian (11) están muy bien organizadas aquí:desarrollador.nvidia.com/cuda-downloads.
Pero parece que tengo un pequeño problema de dependencia, ya sea que pruebe el método deb (local) o el método deb (red). Mi impresión es que apt
quiere instalar las 470
versiones de los paquetes relacionados con nvidia, cuando debería instalar las 495
versiones.
Si ejecuto sudo apt install cuda
obtengo:
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.
Logré instalar algunas dependencias especificando la versión manualmente, por ejemplo, sudo apt install nvidia-settings=495.29.05-1
pero parece un proceso interminable.
Nota: Si ejecuto sudo apt-cache policy nvidia-driver
entonces obtengo:
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
¿Alguien sabe cómo debo proceder?
Por el momento mi /etc/apt/sources.list es el siguiente:
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
PD: También probé el método "runfile (local)", pero después de ejecutar sudo sh cuda_11.5.0_495.29.05_linux.run
y seleccionar los componentes para instalar, aparece "Error de instalación" sin más detalles.
Respuesta1
Me enfrenté a este problema en Debian 12 (prueba). Lo arreglé descargando el .deb para liburcu6 desde https://packages.debian.org/bullseye/liburcu6 e instalarlo con
sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb
Después de eso, volver a ejecutar sudo apt-get -y install cuda
funcionó bien. No profundicé más para ver por qué las versiones más nuevas de Debian no incluyen liburcu6.
Respuesta2
Salga xserver
antes de ejecutar la instalación para que la nvidia-driver
instalación no falle.
sudo service lightdm stop
Lo haría.
Respuesta3
Tengo el mismo problema, pero con la reciente versión 510.39.01 y 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
Por supuesto, si intento eliminarlo ocl-icd-libopencl1
, tengo alrededor de 50 paquetes que dependen de ello. Creo que Vincent ya había trabajado en este error debian #755513, pero podría ser un problema nuevo.
Respuesta4
Lo arreglé descargando el .deb para liburcu6 desdehttps://packages.debian.org/bullseye/liburcu6e instalarlo con
sudo apt install ./Downloads/liburcu6_0.12.2-1_amd64.deb
Visité la página mencionada, pero solo se enumeran las siguientes arquitecturas:
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]
Necesito uno para amd64 (las CPU Intel también usan esta arquitectura). ¿Qué puedo hacer?