When starting VMware on Ubuntu, if you see an error similar to the following:
VMware kernel headers for version ... not found
it is usually because the currently running Linux kernel is missing the kernel headers for the corresponding version. VMware needs these header files to compile or recompile kernel modules on the host machine.
Solution
First, confirm the current kernel version in the terminal:
uname -r
Then install the headers that exactly match the current kernel version:
sudo apt-get update
sudo apt-get install linux-headers-$(uname -r)
You can also specify the version manually, for example:
sudo apt-get install linux-headers-3.5.0-25-generic
After installation, you can check whether the headers have been linked to the current kernel module directory:
ls -l /lib/modules/$(uname -r)/build
If that path exists, restart VMware, or manually recompile the VMware modules:
sudo vmware-modconfig --console --install-all
If it still reports that the headers cannot be found, confirm that the kernel version the system booted into matches the installed headers version. If necessary, reboot the system so Ubuntu uses the newly installed or updated kernel.
Referer link:
http://www.vi-toolkit.com/wiki/index.php/Build_host_vmware_kernel_modules
