Hello team, by installing NVIDIA drivers as per the guideline of Debian on Debian 12, it shows an error as follows:
Building initial module for 6.1.0-21-amd64 > readelf: Error: Not an ELF file - it has the wrong magic bytes at the start > readelf: Error: Not an ELF file - it has the wrong magic bytes at the start > Error! Bad return status for module build on kernel: 6.1.0-21-amd64 > (x86_64) > Consult /var/lib/dkms/nvidia-current/525.147.05/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 (= 525.147.05-7~deb12u1) | > nvidia-kernel-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 configured yet. > Package nvidia-open-kernel-525.147.05 is not installed. > Package nvidia-open-kernel-525.147.05 is not installed. > I researched about it and I found this post <https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4> wherein a person explains how to troubleshoot by enabling verbose option on dkms. As a summary of my troubleshooting it hits the same issue. By checking out the file /var/lib/dkms/nvidia-current/525.147.05/build/make.log as initially the logs suggest, I found the following logs: /bin/sh: 1: ./tools/bpf/resolve_btfids/resolve_btfids: not found > make[3]: *** > [/usr/src/linux-headers-6.1.0-21-common/scripts/Makefile.modfinal:63: > /var/lib/dkms/nvidia-current/525.147.05/build/nvidia-peermem.ko] Error 127 > make[3]: *** Deleting file > '/var/lib/dkms/nvidia-current/525.147.05/build/nvidia-peermem.ko' > The post <https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4> presents the bug: Debian Bug report logs - #1027306 linux-kbuild-6.0: missing `resolve_btfids` and some scripts <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1027306>, as a reason for the log: /bin/sh: 1: ./tools/bpf/resolve_btfids/resolve_btfids: not found The solution of the post <https://forums.debian.net/viewtopic.php?t=158413&sid=edb9d888040ee2a3bb2b7191c40323d4> to this issue is to update the kernel from 6.1.0-13 -> 6.1.0.18; however, my kernel is a later version: 6.1.0-21-amd64, so I am stuck for solving this issue. Do you have any idea about what may be happening and/or how to solve it?