在执行的过程中,我遇到了What is the location of the directory of C header files that match your running的问题。
问题描述:运行./vmware-install.pl后,一直按enter键就ok了,当出现下面这个提示后,你就要小心了.
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
Before you can compile modules, you need to have the following installed...
make
gcc
kernel headers of the running kernel
上面提示的意思安装vmware tools必须先安装gcc和内核头文件。
Searching for GCC...
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
问题来了:它找不到我的内核头文件的路径
Searching for a valid kernel header path...
The path "" is not valid.
Would you like to change it? [yes]
What is the location of the directory of C header files that match your running
kernel?
提示我要输入内核头文件的路径
会出现这种问题有两种情况:
一种是你没有安装内核头文件,那就要先安装.
从linux安装包中 Packages中 拷贝三个文件 分别是:
kernel-2.6.32-131.0.15.el6.i686.rpm
kernel-devel-2.6.32-131.0.15.el6.i686.rpm
kernel-headers-2.6.32-131.0.15.el6.i686.rpm
安装之后就OK了
另外一种情况是vmware的问题,其实kernel header已经安装了,只是没有正确的被识别到
解决办法如下:
1.
如果没有提示错误信息,ps: uname -r
2.
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h
这两条命令给vmwaretools关联了正确的内核头文件的位置
Detected GCC binary at "/usr/bin/gcc".
The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]
Searching for a valid kernel header path...
Detected the kernel headers of the running kernel at
"/lib/modules/2.6.38-8-generic/build/include". // cd /lib/modules/`uname -r`/build/include/linux
The path "/lib/modules/2.6.38-8-generic/build/include" appears to be a valid
path to the kernel headers of the running kernel.
Would you like to change it? [no]
--------------------------------------------------------------------------
Enter ,that's ok!