在2.6.20-gentoo-r8上安装vmware


本文参考了一篇网上的文章:vmware在Linux上安装时关于内核头文件

  事情起因于主板坏掉,于是换了一块,没有重新编译内核(2.6.15),发现也是可以用的。不过机器里有新的2.6.20,于是顺便就想重新编译一下,这样对机器的性能也能更好。(前面关于网卡interface name的问题也是由于换主板而引起的)

  用了新内核之后(用的还是原来的内核配置文件),发现vmware不能用了,于是要重新安装它。安装过程中出错,

  The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.20-gentoo-r8). Even if the module were to compile successfully, it would not load into the running kernel.

  What is the location of the directory of C header files that match your running kernel? [/usr/src/linux/include]

  依照那篇文章中的方法修改了/usr/src/linux/include/linux/version.h,添加了一行

  #define UTS_RELEASE "2.6.20-gentoo-r8"

  之后安装通过,不过要patch的时候又出了问题,我以前用的patch一直是vmware-any-any-update94,不过安装过程出错

  make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] 错误 1
  make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] 错误 2
  make[1]: Leaving directory `/usr/src/kernels/2.6.15-1.2054_FC5-i686'
  make: *** [vmmon.ko] 错误 2
  make: Leaving directory `/tmp/vmware-config0/vmmon-only'
  Unable to build the vmmon module.

  猜测因为内核版本升高此 patch不再适用,于是上网搜索,发现主流的patch为vmware-any-any-update109,下载,安装,编译通过。vmware又可以使用了。

相关内容