Installation of driver nvidia-current-460.91.03 fails on Debian 11 Bullseye

Hello everybody,

i can’t install the nvidia-current-460.91.03 on my Debian box. I followed the official guide but i keep getting an errore when i run:

apt install nvidia-driver

this is the relevant part:

Configurazione di nvidia-kernel-dkms (460.91.03-1)…
Removing old nvidia-current-460.91.03 DKMS files…


Deleting module version: 460.91.03
completely from the DKMS tree.

Done.
Loading new nvidia-current-460.91.03 DKMS files…
Building for 5.10.0-5-amd64
Building initial module for 5.10.0-5-amd64
Error! Bad return status for module build on kernel: 5.10.0-5-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/460.91.03/build/make.log for more information.
dpkg: errore nell’elaborare il pacchetto nvidia-kernel-dkms (–configure):
il sottoprocesso installato pacchetto nvidia-kernel-dkms script post-installation ha restituito lo stato di errore 10
dpkg: problemi con le dipendenze impediscono la configurazione di nvidia-driver:
nvidia-driver dipende da nvidia-kernel-dkms (= 460.91.03-1) | nvidia-kernel-460.91.03; tuttavia:
Il pacchetto nvidia-kernel-dkms non è ancora configurato.
Il pacchetto nvidia-kernel-460.91.03 non è installato.
Il pacchetto nvidia-kernel-dkms che fornisce nvidia-kernel-460.91.03 non è ancora configurato.

dpkg: errore nell’elaborare il pacchetto nvidia-driver (–configure):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell’elaborazione:
nvidia-kernel-dkms
nvidia-driver
E: Sub-process /usr/bin/dpkg returned an error code (1)

this is the content of the make.log file:

DKMS make.log for nvidia-current-460.91.03 for kernel 5.10.0-5-amd64 (x86_64)
ven 28 gen 2022, 13:05:32, CET
make KBUILD_OUTPUT=/lib/modules/5.10.0-5-amd64/build V=1 -C /lib/modules/5.10.0-5-amd64/source M=/var/lib/dkms/nvidia-current/460.91.03/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/5.10.0-5-amd64/source NV_KERNEL_OUTPUT=/lib/modules/5.10.0-5-amd64/build NV_KERNEL_MODULES=“nvidia nvidia-uvm nvidia-modeset nvidia-drm” INSTALL_MOD_DIR=kernel/drivers/video NV_SPECTRE_V2=0 modules
make[1]: ingresso nella directory «/usr/src/linux-headers-5.10.0-5-common»
make -C /usr/src/linux-headers-5.10.0-5-amd64 -f /usr/src/linux-headers-5.10.0-5-common/Makefile modules
make[2]: ingresso nella directory «/usr/src/linux-headers-5.10.0-5-amd64»
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo >&2;
echo >&2 " ERROR: Kernel configuration is invalid.“;
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.”;
echo >&2 " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo >&2 ;
/bin/false)

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.

make[2]: *** [/usr/src/linux-headers-5.10.0-5-common/Makefile:717: include/config/auto.conf] Errore 1
make[2]: uscita dalla directory «/usr/src/linux-headers-5.10.0-5-amd64»
make[1]: *** [Makefile:185: __sub-make] Errore 2
make[1]: uscita dalla directory «/usr/src/linux-headers-5.10.0-5-common»
make: *** [Makefile:80: modules] Errore 2

I’ve also generated the nvidia-bug-report.log, i tried a few times to upload it here but it fails, i’ll try again later.
After reading this page, i checked the gcc version and i think there is no mismatch in my case:

gcc version 10.2.1 20210110 (Debian 10.2.1-6)

*** /proc/version
*** ls: -r–r–r-- 1 root root 0 2022-01-28 12:33:20.828096285 +0100 /proc/version
Linux version 5.10.0-5-amd64 (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.26-1 (2021-03-27)

Any hint? I’ll try again later to upload the nvidia-bug-report.log
Thanks in advance

Please try reinstalling the kernel header
sudo apt install --reinstall linux-headers-$(uname -r)

Ok, i was able to upload the nvidia-bug-report.log nvidia-bug-report.log.gz (135.3 KB)

Please try reinstalling the kernel header
sudo apt install --reinstall linux-headers-$(uname -r)

It won’t reinstall:

rekotc@debianN552VW:/var/log$ sudo apt install --reinstall linux-headers-$(uname -r)
[sudo] password di rekotc:
Lettura elenco dei pacchetti… Fatto
Generazione albero delle dipendenze… Fatto
Lettura informazioni sullo stato… Fatto
La reinstallazione di linux-headers-5.10.0-5-amd64 non è possibile, non può essere scaricato.
I seguenti pacchetti sono stati installati automaticamente e non sono più richiesti:
fonts-open-sans libdbusmenu-qt5-2 libgroupsock8 liblensfun-data-v1 liblensfun1 liblivemedia81 librlottie0-1 libu2f-udev
libx264-161 libx264-163 libxcb-record0 libxcb-screensaver0 linux-headers-5.10.0-10-amd64 linux-headers-5.10.0-10-common
linux-headers-5.10.0-6-amd64 linux-headers-5.10.0-6-common linux-headers-5.10.0-7-amd64 linux-headers-5.10.0-7-common
linux-headers-5.10.0-8-amd64 linux-headers-5.10.0-8-common linux-headers-5.10.0-9-amd64 linux-headers-5.10.0-9-common
Usare “sudo apt autoremove” per rimuoverli.
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.
2 non completamente installati o rimossi.
Dopo quest’operazione, verranno occupati 0 B di spazio su disco.
Continuare? [S/n] S
Configurazione di nvidia-kernel-dkms (460.91.03-1)…
Removing old nvidia-current-460.91.03 DKMS files…


Deleting module version: 460.91.03
completely from the DKMS tree.

Done.
Loading new nvidia-current-460.91.03 DKMS files…
Building for 5.10.0-5-amd64
Building initial module for 5.10.0-5-amd64
Error! Bad return status for module build on kernel: 5.10.0-5-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/460.91.03/build/make.log for more information.
dpkg: errore nell’elaborare il pacchetto nvidia-kernel-dkms (–configure):
il sottoprocesso installato pacchetto nvidia-kernel-dkms script post-installation ha restituito lo stato di errore 10
dpkg: problemi con le dipendenze impediscono la configurazione di nvidia-driver:
nvidia-driver dipende da nvidia-kernel-dkms (= 460.91.03-1) | nvidia-kernel-460.91.03; tuttavia:
Il pacchetto nvidia-kernel-dkms non è ancora configurato.
Il pacchetto nvidia-kernel-460.91.03 non è installato.
Il pacchetto nvidia-kernel-dkms che fornisce nvidia-kernel-460.91.03 non è ancora configurato.

dpkg: errore nell’elaborare il pacchetto nvidia-driver (–configure):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell’elaborazione:
nvidia-kernel-dkms
nvidia-driver
E: Sub-process /usr/bin/dpkg returned an error code (1)

In particular, this message:

La reinstallazione di linux-headers-5.10.0-5-amd64 non è possibile, non può essere scaricato.

can be translated as “The reinstallation of linux-headers-5.10.0-5-amd64 is not possible, it cannot be downloaded”

Looks like you booted into an old kernel, I guess 5.10.0-10 would be the correct one. Please check grub menu.

1 Like

You were right! The latest kernel i had installed on my system was 5.10.0-5, so i did:

sudo apt-get install linux-image-5.10.0-10-amd64

and after that i tried reinstalling the driver and rebooted into 5.10.0-10, and now it works, thank you very much!
Out of curiosity: how did you guess that this was the root of my problem? Something you read in the log files?

Thanks again

It was referenced as available when you tried to install the headers.

1 Like

You have a keen eye! Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.