In both this bug report and the duplicate, the problem is that the system is set to use a gcc version that is much older than the default version.
warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0 You are using: cc (Ubuntu 9.5.0-6ubuntu2) 9.5.0 ** Changed in: nvidia-graphics-drivers-470 (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2077906 Title: nvidia-kernel-source-470 470.256.02-0ubuntu0.24.04.1: nvidia kernel module failed to build To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-470/+bug/2077906/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs