-   Slackware (
-   -   NVIDIA driver install --- kernel headers not configured (

killall 10-15-2008 05:23 PM

NVIDIA driver install --- kernel headers not configured
hey all

i'm more like a lurker but i'll give posting a shot :). i was just comiling a 2.6 kernel (2.6.26) which went quite well. i encounter a problem when installing the NVIDIA driver ( for my geforce fx 5200 video card. i need of course the header files of my new kernel, so i did:


$ mkdir $HOME/src/headers-2.6.26
$ cp -HR $HOME/src/linux-2.6.26/include/asm $HOME/src/headers-2.6.26
$ cp -R $HOME/src/linux-2.6.26/include/asm-generic $HOME/src/headers-2.6.26
$ cp -R $HOME/src/linux-2.6.26/include/linux $HOME/src/headers-2.6.26

i thought this would copy the header files. then i pointed the NVIDIA installer to the headers


# ./ --kernel-include-path=$HOME/src/headers-2.6.26
the error was that the installer complained about a missing file 'include/linux/modversions.h'. the /var/log/nvidia-installer.log file said nothing more enlightning except that this error might be due to unconfigured kernel headers.

so i thought about how to extract/make the kernel headers or the missing files. i checked the make file and tried:


$ make headers_check(_all) //also
$ make headers_install(_all)

to no avail. i finally installed my new kernel with all the modules hoping it would automatically copy the new headers somewhere in /usr/include or so. well, nothing so far. NVIDIA installer is still complaining about missing files and hints to "configure the kernel headers"

anybody know how to do this or what i was missing?
help appreciated, thx

killall -9

keefaz 10-15-2008 05:32 PM

With make modules_install command, the kernel build dir get symlinked in
/lib/modules/<Kernel version>/build

so when you compile and install a kernel from source, you don't need to do anything to install kernel header files!
The programs that need them will find them in /lib/modules/`uname -r`/build/include
no need to mess with the kernel header files!

killall 10-15-2008 11:52 PM

ok, then i'm in trouble. for the NVIDIA installer insists that he can't find the headers:

/var/log/nvidia-installer.log gives:

ERROR: The kernel header file
      '/lib/modules/2.6.26/build/include/linux/modversions.h' does not exist.
      The most likely reason for this is that the kernel header files in
      '/lib/modules/2.6.26/build/include' have not been configured.

i had my modules installed with 'make modules_install'. i am sure i issued the command. i'll have to recompile the kernel anyway, so i will take extra care the next time but for the time being this is rather strange.


keefaz 10-16-2008 03:45 AM

Maybe try with the latest nvidia driver:
Also the current kernel stable version is:

T3slider 10-16-2008 11:42 AM

The kernel *headers* should not be the ones from your new custom kernel, but the ones from the included Slackware kernels. You shouldn't touch your kernel headers unless you are upgrading glibc as well (and you wouldn't do that unless you were upgrading Slackware -- or if you were crazy and overhauling your system). You should download the appropriate kernel-headers package from a Slackware mirror (or use your install CD/DVD) and issue the following command as root:

# upgradepkg --reinstall packagename
where packagename is the name of the kernel-headers package, obviously. If you're using Slackware 10.2 as in your profile info, use kernel-headers-2.4.31-i386-1.tgz. If you are using 12.1, use kernel-headers- You can use a new custom kernel while leaving the existing kernel headers alone -- just don't attempt to install the kernel headers from the new kernel. Just so I know you're not issuing some crazy kernel commands that end up overwriting kernel headers, this guide is a good resource for compiling 2.6.x kernels.

You could also try passing the location of your kernel headers to the nVidia installer. I do remember a previous version of the nVidia drivers not compiling under certain kernel versions even if you passed the correct kernel (source? headers? I can't remember) location, so make sure you have the latest drivers available for your card. I may be looking up the wrong model, but it appears that the latest legacy version for your card is -- NOT the one you are trying to install.

keefaz 10-16-2008 12:39 PM

I think nvidia module compilation requires the current kernel header files as nvidia module is not an user space program but a kernel module, so it is better to use header files from a specific kernel version rather that "generic" header files from distribution.
I could be wrong though, but that makes sense to me :)

killall 10-16-2008 03:57 PM

solved --- human failure
thx for all your help!

@T3slider: i remember reading something like what you said about the kernel headers in a newsgroup mail from linus torvalds. i had the 2.4 headers installed. but the insaller was saying something about '/lib/modules/2.6.26/...' so i thought it might need the new ones after all. more strangely, when i first tried to compile the NVIDIA driver on a freshly installed slackware 10.2 it gave me a message saying the version of my c compiler does not match the one with wich my kernel was compiled...

the problem was human failure! i found myself banging my head against my monitor! i have to apologize. when i downloaded the installer i had only links to browse the web which i normally enjoy but on a widescreen monitor with vga=normal i hit the first link which looked familiar on the nvidia side. i didn't give it another look! that has caused all the problems. downloading the newest driver under X with a graphical web browser didn't solve the problem due to the age of my video card (geforce fx 5200) however the installer was kind enough to point me to the correct version; and now it works again.

but i now have a problem with my monitor. it strangly occured after i banged my head several times with severe force against it. the colors are.... ;) nevermind.

thx again killall

All times are GMT -5. The time now is 12:15 AM.