I cant really say for sure probably you're missing some dependency packages needed to compile your nvidia drivers.
I'd make sure if gcc
(cant recall its full name) is installed or not. Just type rpm -q gcc
to see if its there. If not then try installing it first. You might run into some dependencies error when trying to install gcc. Fall back and install the required files first and then continue untill all missing/dependent files are installed.
As for the kernel header error, make sure you have the kernel-sources
for kernel version 2.4.18-5 installed. You'll need these both
(glibc-kernheaders is the new name for kernel-header file).
hope this gives you some ideas.