vmware workstation 5.5.3在linux 2.6.21.1 kernel下安装错误

vmware workstation 5.5.3在linux 2.6.21.1 kernel下安装错误,错误如下:

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.21.1-custom/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.21'
  CC [M]  /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-2.6.21'
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的vmmon模块中的compat_kernel.h的头文件的一个定义造成的。修改方法如下:
在你的vmware的安装目录:

cd  vmware-distrib/lib/modules/source
tar xvf vmmon.tar
vi vmmon-only/include/compat_kernel.h
跳到第20行
#define __NR_compat_exit __NR_exit
static inline _syscall1(int, compat_exit, int, exit_code);
修改成:
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
    #define __NR_compat_exit __NR_exit
    static inline _syscall1(int, compat_exit, int, exit_code);
#endif


然后存盘退出。
tar cvf vmmon.tar vmmon-only
然后再到安装目录执行vmware-install.pl重新安装。一切OK。

本文参考于网上类似文章,因为文章很多,搞不清楚哪个是原创,所以未提供链接
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值