安装时如果出现这个错误:
What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]
运行vmware-config.pl的时候,会有一步是询问内核的头文件在哪里,可以这样解决,
首先打开/usr/src目录,看看Linux的kernel header的目录名称
,我的为linux-headers-2.6.35-22 和linux-headers-2.6.35-22-generic ,那么手动输入
/usr/src/linux-headers-2.6.35-22-generic/include 回车,返回如下:
The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.35-22-generic). Even if the module were to
compile successfully, it would not load into the running kernel.
进入/usr/src/linux-headers-2.6.35-22-generic/include/linux/ 找到version.h的文件添加一行:
#define UTS_RELEASE "2.6.35-22-generic"
引号内的数字根据你的文件名字改变.
下来继续,再次输入输入/usr/src/linux-headers-2.6.35-22-generic/include地址时 又显示:
The path "/usr/src/linux-headers-2.6.35-22-generic/include" is a kernel header
file directory, but it does not contain the file "linux/autoconf.h" as
expected. This can happen if the kernel has never been built, or if you have
invoked the "make mrproper" command in your kernel directory. In any case, you
may want to rebuild your kernel.
此时
进/usr/src/linux-headers-2.6.35-22-generic/include/generated目录,里面有4个.h的文件,全部拷贝至
/usr/src/linux-headers-2.6.35-22-generic/include/linux/ 文件下
,
此时继续
输入/usr/src/linux-headers-2.6.35-22-generic/include
时可顺利安装vmware tools.