My NVIDIA 515.76 driver installation failed, because dkms fails to build the modules. I post here the part of the nvidia-make.log and nvidia-installer log where it describes the errors for further information. This one is the nvidia-make log:
ld:scripts/module.lds:61: syntax error make[4]: *** [/usr/src/linux-headers-6.0.0-rc7-common/scripts/Makefile.modfinal:59: /var/lib/dkms/nvidia/515.76/build/nvidia-drm.ko] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/usr/src/linux-headers-6.0.0-rc7-common/scripts/Makefile.modpost:134: __modpost] Error 2 make[2]: *** [/usr/src/linux-headers-6.0.0-rc7-common/Makefile:1766: modules] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-6.0.0-rc7-amd64' make[1]: *** [Makefile:222: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-6.0.0-rc7-common' make: *** [Makefile:82: modules] Error 2 And this one is from the installer log:
ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 515.76 -k 6.0.0-rc7-amd64`: Sign command: /usr/lib/linux-kbuild-6.0/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Binary update-secureboot-policy not found, modules won't be signed Building module: Cleaning build area... 'make' -j2 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.0.0-rc7-amd64 modules..............................................(bad exit status: 2) Error! Bad return status for module build on kernel: 6.0.0-rc7-amd64 (x86_64) Consult /var/lib/dkms/nvidia/515.76/build/make.log for more information. -> error. ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information. ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.