Vmware What is the location of the directory of C header files that match your running问题的解决

原文地址:http://blog.sina.com.cn/s/blog_412ef34201016nip.html

在执行的过程中,我遇到了What is the location of the directory of Cheader files that match yourrunning的问题。

问题描述:运行./vmware-install.pl后,一直按enter键就ok了,当出现下面这个提示后,你就要小心了.

Before running VMware Tools for the first time, you need toconfigure 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 followinginstalled...

 

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 gccbinary.

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 matchyour running

kernel?

提示我要输入内核头文件的路径

会出现这种问题有两种情况:

一种是你没有安装内核头文件,那就要先安装.

另外一种情况是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 gccbinary.
Would you like to change it? [no] 

Searching for a valid kernel header path...
Detected the kernel headers of the running kernelat 
"/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 tobe a valid 
path to the kernel headers of the running kernel.
Would you like to change it? [no] 

--------------------------------------------------------------------------

Enter ,that's ok!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值