NVIDIA-Linux-x86_64.320.32.run install fails on RHEL 5.8 with GeForce GT620

I tried searching before posting this but didn’t find anything. I apologize if another thread covers this.

I am trying to install the NVIDIA Linux driver on my RHEL 5.8 system with no lock. I have been following the suggested install directions at https://access.redhat.com/solutions/5258

I have kernel-devil gcc installed but when I stop X windows and try to install the driver with # sh NVIDIA-Linux-x68_64.320.32.run I get an error that it is unable to find the kernel source tree for the currently running kernel.

Here is the content of the NVidia-installer.log:
nvidia-installer log file ‘/var/log/nvidia-installer.log’
creation time: Tue Mar 17 15:46:15 2015
installer version: 340.32

PATH: /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/fts:/root/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses user interface
→ License accepted.
→ Installing NVIDIA driver version 340.32.
→ Performing CC sanity check with CC=“/usr/bin/cc”.
ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the ‘kernel-source’ or ‘kernel-devel’ RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the ‘–kernel-source-path’ command line option.
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.

Any help would be much appreciated.

I was able to use --kernel-source-oath to point to the kernel source. The installation proceeded and the kernel module compilation completes however I get an unable to load kernel module ‘NVidia.ko’. Here is the complete message from the NVidia-installer.log:

ERROR: Unable to load the kernel module ‘nvidia.ko’. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release.

Please see the log entries ‘Kernel module load error’ and ‘Kernel messages’ at the end of the file ‘/var/log/nvidia-installer.log’ for more information.
→ Kernel module load error: insmod: error inserting ‘./kernel/nvidia.ko’: -1 Invalid module format
→ Kernel messages:
wlan0: RX AssocResp from 20:3a:07:32:ff:71 (capab=0x421 status=0 aid=182)
wlan0: associated
wlan0: deauthenticating from 20:3a:07:32:ff:71 by local choice (reason=3)
wlan0: deauthenticating from 20:3a:07:32:ff:71 by local choice (reason=3)
wlan0: direct probe to AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: direct probe responded
wlan0: authenticate with AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: authenticated
wlan0: associate with AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: RX AssocResp from 20:3a:07:0d:dc:c1 (capab=0x421 status=0 aid=23)
wlan0: associated
wlan0: deauthenticating from 20:3a:07:0d:dc:c1 by local choice (reason=3)
[drm] Initialized drm 1.0.1 20051102
nvidia: disagrees about version of symbol struct_module
wlan0: deauthenticating from 20:3a:07:0d:dc:c1 by local choice (reason=3)
wlan0: direct probe to AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: direct probe responded
wlan0: authenticate with AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: authenticated
wlan0: associate with AP 20:3a:07:0d:dc:c1 (try 1)
wlan0: RX AssocResp from 20:3a:07:0d:dc:c1 (capab=0x421 status=0 aid=23)
wlan0: associated
wlan0: deauthenticating from 20:3a:07:0d:dc:c1 by local choice (reason=3)
[drm] Initialized drm 1.0.1 20051102
nvidia: disagrees about version of symbol struct_module
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.