Sudo sh cuda_12.6.2_560.35.03_linux.run on centos 10

make[3]: Target ‘/tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/’ not remade because of errors.
make[2]: *** [/usr/src/kernels/6.11.0-29.el10.x86_64/Makefile:1982: /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel] Error 2
make[2]: Target ‘modules’ not remade because of errors.
make[1]: *** [Makefile:236: __sub-make] Error 2
make[1]: Target ‘modules’ not remade because of errors.
make[1]: Leaving directory ‘/usr/src/kernels/6.11.0-29.el10.x86_64’
make: *** [Makefile:89: modules] Error 2
→ Checking to see whether the nvidia kernel module was successfully built
executing: ‘cd kernel; /bin/make -k -j16 NV_EXCLUDE_KERNEL_MODULES=“” SYSSRC=“/lib/modules/6.11.0-29.el10.x86_64/source” SYSOUT=“/lib/modules/6.11.0-29.el10.x86_64/build” NV_KERNEL_MODULES=“nvidia”’…
make[1]: Entering directory ‘/usr/src/kernels/6.11.0-29.el10.x86_64’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-2)
You are using: cc (GCC) 14.2.1 20240801 (Red Hat 14.2.1-2)
MODPOST /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/Module.symvers
CC [M] /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/nvidia.mod.o
CC [M] /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/.module-common.o
LD [M] /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/nvidia.ko
BTF [M] /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/nvidia.ko
Skipping BTF generation for /tmp/selfgz67657/NVIDIA-Linux-x86_64-560.35.03/kernel/nvidia.ko due to unavailability of vmlinux
make[1]: Leaving directory ‘/usr/src/kernels/6.11.0-29.el10.x86_64’

The cc is the link of gcc, so cc==gcc, why have this issue?

sudo sh NVIDIA-Linux-x86_64-565.57.01.run also not work.

sudo dnf module install nvidia-driver:latest-dkms work and driver 565 can be installed successfully for gpu 1080ti.