I've recently upgraded my Redhat 9 system to the kernel version 2.4.20-20.9.
I downloaded and tried to build nVidia's latest driver NVIDIA-Linux-x86-1.0-4496-pkg2.run.
After telling it were my kernel source was, it still failed.
Can anyone help?

Normally I don't jump into other peoples threads, but I am having the "same" problem.

I'm using RH9, and was able to install the drivers just fine on the default kernel (2.4.20-8), but when i updated my kernel (2.4.20-20.9) I couldn't use the drivers without compiling a custom one... "no prob" i think... i downloaded the kernel src rpm from redhat... and i THINK i install it (ill get back to that) but the nvidia installer says it cant find the kernel header file... so i did a locate, found it in /usr/include/linux/kernel.h... so i ran the installer with the:

--kernel-include-path /usr/include/

option, and it seemed to have found the file... however, it still puked, and the log says that it couldn't find "storage size of" rctimer, nvfops, and nv_vm_ops....

eh?

plus, rpm -qa doesn't list the kernel header rpm, and it seems more than happy to reinstall repeatedly (as far as i know, rpms bitch if you try and reinstall them) so logically, that is failing... somehow.... a -ivh looks like it completes successfully, however...

I suppose "how do i compile my own drivers" is a sort of FAQ... is there one somewhere to read?

Chances are this is the most frequently asked question (in some form or another), but unfortunately, there is no answer that will "just work(tm)". In general, you will need to have the kernel source package matching the running kernel installed. In this context, "matching" means that the version must be identical, but it also means that the kernel source tree must be configured correctly, i.e. using the same kernel configuration file used to build the running kernel.

Since distributors usually take care of this using more or less sophisticated mechanisms or packaging, users typically only need to locate and install the correct kernel source package. Unfortunately, this doesn't always work. In this case, it seems that the 2.4.20-20.9 source tree has gotten into a funny state somehow (there seems to be a problem related to modversions).

RedHat ships the kernel configuration files for their different kernel variants (i586, i686, UP/SMP, ...) in a configs/ directory (relative to the top-level kernel source directory); you could try to locate the correct configuration file for the running kernel (uname -a, /proc/version) and reconfigure the kernel source tree using something like make mrproper; cp configs/config-... .config; make oldconfig depend clean (where config-... is the correct configuration file).