NVIDIA / nvidia-container-toolkit

Build and run containers leveraging NVIDIA GPUs
Apache License 2.0
2.33k stars 251 forks source link

Error installing Nvidia driver on Debian 12.5 #361

Open splendidcomputer opened 8 months ago

splendidcomputer commented 8 months ago

Issue Summary: When attempting to install the Nvidia driver (nvidia-driver) on Debian 12.5, I encountered an error preventing successful installation.

Error Message:

Setting up nvidia-persistenced (525.85.05-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nvidia-persistenced.
service → /lib/systemd/system/nvidia-persistenced.service.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 145.
Setting up nvidia-egl-icd:amd64 (525.147.05-4~deb12u1) ...
Setting up libnvidia-encode1:amd64 (525.147.05-4~deb12u1) ...
Setting up nvidia-driver-libs:amd64 (525.147.05-4~deb12u1) ...
Processing triggers for nvidia-alternative (525.147.05-4~deb12u1) ...
update-alternatives: updating alternative /usr/lib/nvidia/current because link g
roup nvidia has changed slave links
Setting up nvidia-kernel-dkms (525.147.05-4~deb12u1) ...
Loading new nvidia-current-525.147.05 DKMS files...
Building for 6.1.0-18-amd64
Building initial module for 6.1.0-18-amd64
Error! Bad return status for module build on kernel: 6.1.0-18-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/525.147.05/build/make.log for more informat
ion.
dpkg: error processing package nvidia-kernel-dkms (--configure):
 installed nvidia-kernel-dkms package post-installation script subprocess return
ed error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver:
 nvidia-driver depends on nvidia-kernel-dkms (= 525.147.05-4~deb12u1) | nvidia-k
ernel-525.147.05 | nvidia-open-kernel-525.147.05 | nvidia-open-kernel-525.147.05
; however:
  Package nvidia-kernel-dkms is not configured yet.
  Package nvidia-kernel-525.147.05 is not installed.
  Package nvidia-kernel-dkms which provides nvidia-kernel-525.147.05 is not conf
igured yet.
  Package nvidia-open-kernel-525.147.05 is not installed.
  Package nvidia-open-kernel-525.147.05 is not installed.

dpkg: error processing package nvidia-driver (--configure):
 dependency problems - leaving unconfigured
...

System Information:

Steps to Reproduce:

  1. Attempt to install the Nvidia driver on Debian 12.5 using the command sudo apt install nvidia-driver.
  2. Observe the error messages during the installation process.

Expected Behavior: The Nvidia driver should install successfully without encountering errors.

Additional Notes:


lorenzoridolfi commented 8 months ago

Following the instructions from this thread, the problem was solved for me. https://unix.stackexchange.com/questions/769026/debian-12-linux-image-6-1-0-18-amd64-dist-upgrade-fails-on-nvidia-gpl-incompatib After modifying the files, I run make at /usr/src/nvidia-current-525.147.05/ Finally, I run sudo apt install nvidia-kernel-dkms

ASRodrigo1 commented 7 months ago

Following the instructions from this thread, the problem was solved for me. https://unix.stackexchange.com/questions/769026/debian-12-linux-image-6-1-0-18-amd64-dist-upgrade-fails-on-nvidia-gpl-incompatib After modifying the files, I run make at /usr/src/nvidia-current-525.147.05/ Finally, I run sudo apt install nvidia-kernel-dkms

Worked! Thank you!

mkgin commented 6 months ago

I think this is now fixed in bookworm-proposed-updates

https://lists.debian.org/debian-stable-announce/2024/02/msg00002.html

Add deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware to your source list.

dlandry8 commented 6 months ago

I recently encountered the same problem. I emailed one of the developers, and apparently there is a bug with a particular build of the nvidia drivers that leads to build errors when attempting to build nvidia_kernel_dkms. In /etc/apt/sources.list, make sure "contrib" and "non-free" are added to every source (the instructions on the Debian site are not clear on this), and make sure the drivers you are installing are -7 (i.e., 525.147.05-7~deb12u1).

chaoqunxie commented 4 months ago

how should i do? help

apt-get install nvidia-driver

Loading new nvidia-current-535.161.08 DKMS files... Building for 6.1.0-21-amd64 Building initial module for 6.1.0-21-amd64 Error! Bad return status for module build on kernel: 6.1.0-21-amd64 (x86_64) Consult /var/lib/dkms/nvidia-current/535.161.08/build/make.log for more information. dpkg: error processing package nvidia-kernel-dkms (--configure): installed nvidia-kernel-dkms package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of nvidia-driver: nvidia-driver depends on nvidia-kernel-dkms (= 535.161.08-2~deb12u1) | nvidia-kernel-535.161.08 | nvidia-open-kernel-535.161.08; however: Package nvidia-kernel-dkms is not configured yet. Package nvidia-kernel-535.161.08 is not installed. Package nvidia-kernel-dkms which provides nvidia-kernel-535.161.08 is not configured yet. Package nvidia-open-kernel-535.161.08 is not installed.

dpkg: error processing package nvidia-driver (--configure): dependency problems - leaving unconfigured Processing triggers for libc-bin (2.36-9+deb12u7) ... Processing triggers for initramfs-tools (0.142) ... update-initramfs: Generating /boot/initrd.img-6.1.0-21-amd64 Processing triggers for update-glx (1.2.2) ... Processing triggers for glx-alternative-nvidia (1.2.2) ... update-alternatives: using /usr/lib/nvidia to provide /usr/lib/glx (glx) in auto mode Processing triggers for glx-alternative-mesa (1.2.2) ... Processing triggers for libc-bin (2.36-9+deb12u7) ... Processing triggers for initramfs-tools (0.142) ... update-initramfs: Generating /boot/initrd.img-6.1.0-21-amd64 Errors were encountered while processing: nvidia-kernel-dkms nvidia-driver E: Sub-process /usr/bin/dpkg returned an error code (1)

cat /etc/apt/sources.list

deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
chaoqunxie commented 4 months ago

apt-get upgrade nvidia-driver-*

Error! Bad return status for module build on kernel: 6.1.0-21-amd64 (x86_64) Consult /var/lib/dkms/nvidia-tesla-470/470.239.06/build/make.log for more information. dpkg: error processing package nvidia-tesla-470-kernel-dkms (--configure): installed nvidia-tesla-470-kernel-dkms package post-installation script subprocess returned error exit status 10 dpkg: dependency problems prevent configuration of nvidia-tesla-470-driver: nvidia-tesla-470-driver depends on nvidia-tesla-470-kernel-dkms (= 470.239.06-1~deb12u1) | nvidia-tesla-470-kernel-470.239.06; however: Package nvidia-tesla-470-kernel-dkms is not configured yet. Package nvidia-tesla-470-kernel-470.239.06 is not installed. Package nvidia-tesla-470-kernel-dkms which provides nvidia-tesla-470-kernel-470.239.06 is not configured yet.

dpkg: error processing package nvidia-tesla-470-driver (--configure): dependency problems - leaving unconfigured Processing triggers for update-glx (1.2.2) ... Processing triggers for glx-alternative-nvidia (1.2.2) ... Processing triggers for glx-alternative-mesa (1.2.2) ... Processing triggers for libc-bin (2.36-9+deb12u7) ... Processing triggers for initramfs-tools (0.142) ... update-initramfs: Generating /boot/initrd.img-6.1.0-21-amd64 Errors were encountered while processing: nvidia-kernel-dkms nvidia-driver nvidia-driver-full nvidia-tesla-driver nvidia-tesla-470-kernel-dkms nvidia-tesla-470-driver E: Sub-process /usr/bin/dpkg returned an error code (1)

chaoqunxie commented 4 months ago

i reinstall debian14.8 and resolve it

https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-535-161-08/index.html

image