Previous Post: Tip of the day: Quick copy/paste in linux
Next Post: Tip of the day: Middle clicking link to open in new tab
Posted By Scott Klarr on Dec 23, 2007 at 12:59 pm
This particular post contained filenames specifically for upgrading to kernel 2.6.22.12 in Mandriva, but the same concept applies to any versioning. Just adjust the filenames/commands accordingly.
After updating my linux kernel, I needed to rebuild the vmware kernel module in order to work with the new kernel. So I run the vmware-config.pl script, go through all the simple questions, and then it gets to point where it looks for a pre-built module for the kernel in usage. Of course it cant find one and gives me the option to build it. Go for it i say! I am halted with this lovely message:
The directory of kernel headers (version 2.6.22.9-desktop-2mdv) does not match your running kernel (version 2.6.22.12-desktop-1mdv). Even if the module were to compile successfully, it would not load into the running kernel.
Oh yeah, I forgot to download the new source code. Here is where i made my mistake, and if you came to this page via search engine, you probably made the same. I load the package manager and install the kernel-source-2.6.22.12-1mdv package. Then attempt to rebuild the module again. This time, it throws this at me:
The directory of kernel headers (version 2.6.22.12-1mdvcustom) does not match your running kernel (version 2.6.22.12-desktop-1mdv). Even if the module were to compile successfully, it would not load into the running kernel.
Lovely. If you cant tell from the message, the source code downloaded is labeled as 2.6.22.12-1mdvcustom whereas my actual kernel being used is labeled as 2.6.22.12-desktop-1mdv. So i go googling around hoping to find an alternate source download that contains source code for 2.6.22.12-desktop-1mdv. I tried about 6 installed, most from different sources, and all them had the 2.6.22.12-1mdvcustom headers.
If your having this same issue, lucky for you I found my mistake. The kernel-source-2.6.22.12-1mdv package is the full kernel source, but to build the vmware module, you actually need to install the kernel-desktop-devel-2.6.22.12 package.
Once you have kernel-desktop-devel-2.6.22.12 installed, in the console, goto /usr/src and type in ls -l. You need to first verify that the directory linux-2.6.22.12-desktop-1mdv exists. Then you need to look at the linux symbolic link and make sure its pointing to linux-2.6.22.12-desktop-1mdv. So it should look something like this:
lrwxrwxrwx 1 root root 20 2007-12-22 13:31 linux -> linux-2.6.22.12-1mdv/
drwxr-xr-x 20 root root 4096 2007-12-22 13:31 linux-2.6.22.12-1mdv/
drwxr-xr-x 20 root root 4096 2007-12-23 12:57 linux-2.6.22.12-desktop-1mdv/
drwxr-xr-x 20 root root 4096 2007-12-22 13:03 linux-2.6.22.12-desktop586-1mdv/
If the symbolic link is NOT linking to the correct directory, you can do the following:
cd /usr/src
rm -f linux
ln -s linux-2.6.22.12-desktop-1mdv linux

Jeff - Feb 02, 2008
Thanks alot this solution actually helped with my Cisco VPN install. I was having the same exact issue with its install thanks again