vmare tool安装 全屏

来源:互联网 发布:mac steam下载dota2 编辑:程序博客网 时间:2024/05/02 04:58

在执行的过程中,我遇到了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. 运行cd /lib/modules/`uname -r`/build/include/linux
如果没有提示错误信息,ps: uname -r  
查看内核版本号  

 

2. 做两个软连接就行了,具体方法是运行下面两条命令
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h

这两条命令给vmwaretools关联了正确的内核头文件的位置

3. 再次执行./vmware-install.pl后,如下所示 :vmware已经可以找到了合法的内核头文件路径,接下来就是继续按enter键了。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...
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!

 

 ps :还有一种更加保险的方法,当你文件系统更新了,最好把你的虚拟机也更新一下,最后你会发现,问题已经不再是问题了。