实验环境:Ubuntu 8.04
1、下载VMware Workstation 5.5.7 for Linux
http://www.vmware.com/download/ws/ws5.html
2、下载vmware-any-any-update115.tar.gz(好像vmware-any-any-update116.tar.gz好些)
http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html
3、进入vmware-any-any-update115.tar.gz解压后的目录vmware-any-any-update115,输入:
tar xvf vmmon.tar
rm vmmon.tar
gedit vmmon-only/include/vcpuset.h
将# #include “asm/bitops.h” 改为 #include “linux/bitops.h”
tar cvf vmmon.tar vmmon-only
rm -rf vmmon-only
4、进入VMware Workstation 5.5.7 for Linux解压后的目录vmware-distrib,输入
cp ~/vmware-any-any-update115/vmmon.tar ~/vmware-distrib/lib/modules/source/
cp ~/vmware-any-any-update115/vmnet.tar ~/vmware-distrib/lib/modules/source/
sudo ./vmware-install.pl
结束时会有一些提示信息,配置完成好像没什么影响。第三步不修改vcpuset.h的话会出现如下错误:
Building the vmmon module.Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only’
make -C /lib/modules/2.6.24-16-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic’
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config1/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config1/vmmon-only/common/comport.o
CC [M] /tmp/vmware-config1/vmmon-only/common/cpuid.o
在包含自 include/asm/bitops.h:2 的文件中,
从 /tmp/vmware-config1/vmmon-only/./include/vcpuset.h:74,
从 /tmp/vmware-config1/vmmon-only/./include/modulecall.h:23,
从 /tmp/vmware-config1/vmmon-only/common/vmx86.h:18,
从 /tmp/vmware-config1/vmmon-only/common/hostif.h:18,
从 /tmp/vmware-config1/vmmon-only/common/cpuid.c:
include/asm/bitops_32.h:9:2: 错误: #error only
can be included directly
make[2]: *** [/tmp/vmware-config1/vmmon-only/common/cpuid.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [vmmon.ko] 错误 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only’
Unable to build the vmmon module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
Execution aborted.
最后的步骤
如果你这时尝试去运行vmware,你可能会得到一些错误提示和你的抱怨,这时还有一件事需要我们去设置。(VMware,如果你看到这些,请在你的正式发行版中修复这些错误)
基本上,VMware的这些错误和那些抱怨,是关于一些cairo库和gcc,所以,用符号连接指向它们就可以修复它们,
sudo ln -sf /usr/lib/gcc/i486-linux-gnu/4.2.3/libgcc_s.so /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1
sudo ln -sf /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0
删除libgcc_s.so.1好像也可以用。