希望和广大热爱技术的童鞋一起交流,成长。
分类: LINUX
2011-07-31 12:47:11
Console代码:
1.What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] <直接按 Enter>
2.The path "/usr/src/linux/include" is not an existing directory.
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] <直接按 Enter>
Console代码:
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.35-22-generic/include
按回车以后,还是报错说,指定的Kernel headers和当前系统使用的版本不匹配。
Console代码:
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-22-generic/include/linux/version.h ,而现在已经移到了/usr/src/linux-headers-2.6.35-22-generic/include/generated/utsrelease.h。
解决办法:打开/usr/src/linux-headers-2.6.35-22-generic/include/linux/version.h,在最上面一行添加:#define UTS_RELEASE "2.6.35-22-generic" (具体值使用 “uname -r“ 查看)
接下来继续,又会有新的错误提示找不到 autoconf.h 原因是因为 autoconf.h 不在VMware tools 安装程序预设的寻址目录中。
Console代码:
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.
解决方法:
$cd /usr/src/linux-headers-2.6.35-22-generic/include/linux
$sudo ln -s ../generated/autoconf.h ./