Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu 10.10安装VMware tools遇到找不到C header的问题解决

    以下问题的解决办法大多从网络上搜索得到,自己只是整理照搬过来而已。    在Ubuntu 10.10上安装vmware tools,我这里主要遇到的问题都出现在以下这步中,    What is the location of the directory of C header files that match your running  kernel? [/usr/src/linux/include]     如果直接回车,会显示 The path "/usr/src/linux/include"  is not an existing directory.     因此,首先要更改该路径。这里很简单,首先用uname -r命令找到当前的linux内核版本,我这里的版本为2.6.35-25-generic,因此更改后的路径如下:     “/usr/src/linux-headers-2.6.35-25-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.     这是不是不匹配,而是因为 Kernel 中有一个变量 UTS_RELEASE 位置改变了。以前这个定义放在 /usr/src/linux-headers-2.6.35-25-generic/include/linux/version.h ,而现在已经移到了/usr/src/linux-headers-2.6.35-25-generic/include/generated/utsrelease.h。所以vmware tools找不到这个变量的定义,修改的办法有两种:    1. 在version.h中添加 #define UTS_RELEASE "2.6.35-25-generic"     2. 直接将utsrelease.h拷贝回来,cp -p generated/utsrelease.h linux/utsrelease.h       修改后再回车,仍然存在问题:    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.          根据提示可以知道,是因为找不到 linux/autoconf.h文件,这个文件在新的linux内核中被挪到了 generated文件夹中,因此修改的办法也很简单,直接将这个文件拷贝过来即可     cp -p generated/ autoconf .h linux/ autoconf .h     这样修改完成后,应该就可以顺利安装了。Ubuntu 10.10 Server 64bit 在VMware Workstation 6上安装VMware上安装的Ubuntu不能上网的解决方法相关资讯      Ubuntu 10.10 
  • Ubuntu 10.10下月起停止更新  (03/12/2012 15:39:45)
  • Ubuntu 10.10安装使用VNC  (10/29/2011 13:13:05)
  • 在Ubuntu 10.10上安装LAMP  (07/18/2011 09:19:11)
  • Ubuntu 10.10与Fedora 14下使用scp  (11/15/2011 16:03:56)
  • Ubuntu 10.10用LibreOffice替换  (08/10/2011 19:53:36)
  • Ubuntu 10.10同步CyanogenMod源码  (07/06/2011 17:59:10)
本文评论 查看全部评论 (5)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 5 楼 352167564 发表于 2012/12/2 20:02:08你好!我的/usr/src里没有任何东西那我该怎么解决这个问题?回复 支持 (0) 反对 (0)第 4 楼 jian_pku 发表于 2011/11/16 11:12:26Thanks回复 支持 (0) 反对 (0)第 3 楼 mygod 发表于 2011/8/17 0:28:06非常之感谢,困扰了几天的问题终于解决了