Ubuntu 10.10 上安装 vmware tools 库文件问题的解决
在 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
这样修改完成后,应该就可以顺利安装了。
评论0