Nvidia 545 installation is getting failed in my ubuntu 20.04 and i have RTX4000

i am tried installing the below run files

  1. NVIDIA-Linux-x86_64-545.23.06.run
  2. NVIDIA-Linux-x86_64-545.29.02.run
  3. NVIDIA-Linux-x86_64-545.29.06.run
  4. NVIDIA-Linux-x86_64-470.161.03.run
    first i disabled Nouveau driver and restarted my machine
    then i installed gcc-9.4 and some pre-requisites
    then i runned the file as shown below
    sudo sh NVIDIA-Linux-x86_64-545.29.06.run --silent

i am getting the below error:
MODPOST /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:133: /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers] Error 1
make[2]: *** Deleting file ‘/tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers’
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1830: modules] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.0-107-generic’
make: *** [Makefile:80: modules] Error 2
→ Checking to see whether the nvidia kernel module was successfully built
executing: ‘cd ./kernel; /usr/bin/make -k -j16 NV_KERNEL_MODULES=“nvidia” NV_EXCLUDE_KERNEL_MODULES=“” SYSSRC=“/lib/modules/5.15.0-107-generic/build” SYSOUT=“/lib/modules/5.15.0-107-generic/build”’…
make[1]: Entering directory ‘/usr/src/linux-headers-5.15.0-107-generic’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
You are using: cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
MODPOST /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:133: /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers] Error 1
make[2]: *** Deleting file ‘/tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers’
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1830: modules] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.0-107-generic’
make: *** [Makefile:80: modules] Error 2
→ Error.
ERROR: An error occurred while performing the step: “Checking to see whether the nvidia kernel module was successfully built”. See /var/log/nvidia-installer.log for details.
→ The command cd ./kernel; /usr/bin/make -k -j16 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/5.15.0-107-generic/build" SYSOUT="/lib/modules/5.15.0-107-generic/build" failed with the following output:

make[1]: Entering directory ‘/usr/src/linux-headers-5.15.0-107-generic’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
You are using: cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
MODPOST /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers
ERROR: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘rcu_read_unlock_strict’
make[2]: *** [scripts/Makefile.modpost:133: /tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers] Error 1
make[2]: *** Deleting file ‘/tmp/selfgz105496/NVIDIA-Linux-x86_64-470.161.03/kernel/Module.symvers’
make[2]: Target ‘__modpost’ not remade because of errors.
make[1]: *** [Makefile:1830: modules] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.0-107-generic’
make: *** [Makefile:80: modules] Error 2
ERROR: The nvidia kernel module was not created.
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.

Advance thanks for the help.

All drivers you used are incompatible to recent kernels. only 470.256.02, 535.183.01, 550, 555 are compatible. Also, rather install the driver using Ubuntu’s Software&Updates not the runfile installer, possibly adding the graphics drivers ppa.

also can u provide me any pre-requisites i need to install before running the .run file
any spec document if possible
give me the list of nvidia-drivers that support ubuntu 20.04, 22.04 and 18.04 forever beacuse i have some sites with no internet access for that i need to provide the offline packages

i am not supposed to use the Ubuntu’s Software&Update, thats why i am using the RUN file also due to lack od internet access in the site.

That’s not possible unless you never update the linux kernel.
Always use the latest that supports your gpu.
https://http.download.nvidia.com/XFree86/Linux-x86_64/

You will need at last the packages build-essential, linux-headers-$(uname -r) and dkms for auto-build on kernel updates, then enable dkms using the --dkms switch on the runfile installer.

  1. which kernel support 545 nvidia drivers, and same kernel support the remaining like 470, 550, 555 and 530 drivers also or not. let me know which kernel support all the driver versions.

  2. How can i know that the nvidia driver suppoted kernel version?