This forum is no longer active. Please post your questions to our new community site

Installing VMWare Tools on Ubuntu 11.04 (Tracks)

Subscribe to Installing VMWare Tools on Ubuntu 11.04 (Tracks) 7 post(s), 2 voice(s)

 
Avatar patrickdickey 10 post(s)

Hello everyone,

I’ve followed the tutorial for installing VMWare Tools on Ubuntu 10.10 and ran into this error when I try to run sudo /usr/bin/vmware-config-tools.pl

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.38-8-generic/include

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.38-8-virtual). Even if the module were to
compile successfully, it would not load into the running kernel.

This is as far as I can get, because even though uname -a shows 2.6.38-8-virtual and I have those headers installed, it won’t accept the directory.

Any help in getting this to install is greatly appreciated. I do have dkms installed as well.

Have a great day:)
Patrick.

 
Avatar patrickdickey 10 post(s)

I just noticed which message I copied. I did try with /usr/src/linux-headers-2.6.38-8-virtual/include, and still got the same error (the one in my original post came from trying every possible option in my /usr/src directory.

Patrick.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

It is also necessary to install linux-source. I updated the wiki.

 
Avatar patrickdickey 10 post(s)

I just installed linux-source and linux-source-2.6.38-8-all (which was installed automatically with linux-source). When I run the vmware-tools-config.pl script, I get to the same place, and get the same error. Apparently my version is a VMWare tagged version, and the script needs headers that are tagged the same way.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.38-8-virtual/include

The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.38-8-virtual). Even if the module were to
compile successfully, it would not load into the running kernel.

How do I get around this (or should I just reboot the vm and see if the addition of the source files fixes something)?

Have a great day:)
Patrick.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

I checked that creating the following symlinks fix the issue:

$ sudo ln -s /lib/modules/your_kernel_version/build/include/generated/utsrelease.h /lib/modules/your_kernel_version/build/include/linux/utsrelease.h
$ sudo ln -s /lib/modules/your_kernel_version/build/include/generated/autoconf.h /lib/modules/your_kernel_version/build/include/linux/autoconf.h

I hope it helps

 
Avatar patrickdickey 10 post(s)

Yep, that did the trick. I didn’t read the commands closely enough at first though. I just copied/pasted them, and when I got the errors, I realized that I needed to substitute “your_kernel_version” with 2.6.38-8-virtual (just for reference for other users). So, for example, if you’re running 2.6.38-8-virtual, you would put

$ sudo ln -s /lib/modules/2.6.38-8-virtual/build/include/generated/utsrelease.h /lib/modules/2.6.38-8-virtual/build/include/linux/utsrelease.h
$ sudo ln -s /lib/modules/2.6.38-8-virtual/build/include/generated/autoconf.h /lib/modules/2.6.38-8-virtual/build/include/linux/autoconf.h

For other versions, the “2.6.38-8-virtual” would be changed to your specific version (found with the uname -a command)

Have a great day:)
Patrick.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Nice, I’m glad to hear that.