您好朋友,感谢您关注xiaosilent,我在blogjava的博客已经停止更新,请访问http://kuan.fm了解我的最新情况,谢谢!
随笔-82  评论-133  文章-0  trackbacks-0
ubuntu Hardy上,安装VMware workstation时:

Using 2.6.x kernel build system.
make: Entering directory `
/tmp/vmware-config2/vmmon-only'
make 
-/lib/modules/2.6.24.4-64.fc8/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[
1]: Entering directory `/usr/src/kernels/2.6.24.4-64.fc8-i686'
CC [M] 
/tmp/vmware-config2/vmmon-only/linux/driver.o
CC [M] 
/tmp/vmware-config2/vmmon-only/linux/hostif.o
CC [M] 
/tmp/vmware-config2/vmmon-only/common/comport.o
CC [M] 
/tmp/vmware-config2/vmmon-only/common/cpuid.o
In file included from include
/asm/bitops.h:2,
                 from 
/tmp/vmware-config2/vmmon-only/./include/vcpuset.h:74,
                 from 
/tmp/vmware-config2/vmmon-only/./include/modulecall.h:23,
                 from 
/tmp/vmware-config2/vmmon-only/common/vmx86.h:18,
                 from 
/tmp/vmware-config2/vmmon-only/common/hostif.h:18,
                 from 
/tmp/vmware-config2/vmmon-only/common/cpuid.c:14:
include
/asm/bitops_32.h:9:2: error: #error only <linux/bitops.h> can be included directly
make[
2]: *** [/tmp/vmware-config2/vmmon-only/common/cpuid.o] Error 1
make[
1]: *** [_module_/tmp/vmware-config2/vmmon-only] Error 2
make[
1]: Leaving directory `/usr/src/kernels/2.6.24.4-64.fc8-i686'
make: 
*** [vmmon.ko] Error 2
make: Leaving directory `
/tmp/vmware-config2/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".

Problem: include/asm/bitops_32.h:9:2: error: #error only <linux/bitops.h> can be included directly, and vmmon-only compile failes

Solution: change line 74 in vmmon-only source file to read: #include “linux/bitops.h”

Steps:

  1. cd /usr/lib/vmware/modules/source
  2. sudo cp vmmon.tar vmmon.tar.bak
  3. sudo tar xvf vmmon.tar
  4. cd vmmon-only/include/
  5. sudo gedit vcpuset.h
  6. change line 74 from: #include “asm/bitops.h” to: #include “linux/bitops.h”
  7. rm vmmon.tar
  8. sudo tar cvf vmmon.tar vmmon-only
  9. sudo rm -rf vmmon-only
  10. sudo vmware-config.pl

That’s it, the compile will work now and vmware should be usable as normal


posted on 2008-04-22 10:19 xiaosilent 阅读(2319) 评论(2)  编辑  收藏 所属分类: Linux相关

评论:
# re: 新内核安装VMware,编译错误的解决 2008-08-08 13:34 | ysb
Greate. thanks. It do help !  回复  更多评论
  
# re: 新内核安装VMware,编译错误的解决 2008-09-15 10:26 | TSC
None of the pre-built vmnet modules for VMware Workstation is suitable for your
running kernel. Do you want this program to try to build the vmnet module for
your system (you need to have a C compiler installed on your system)? [yes]

Extracting the sources of the vmnet module.

Building the vmnet module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config3/vmnet-only'
make -C /lib/modules/2.6.25.14-69.fc8/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/kernels/2.6.25.14-69.fc8-i686'
CC [M] /tmp/vmware-config3/vmnet-only/driver.o
CC [M] /tmp/vmware-config3/vmnet-only/hub.o
CC [M] /tmp/vmware-config3/vmnet-only/userif.o
CC [M] /tmp/vmware-config3/vmnet-only/netif.o
CC [M] /tmp/vmware-config3/vmnet-only/bridge.o
/tmp/vmware-config3/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/vmware-config3/vmnet-only/bridge.c:947: 错误:隐式声明函数 ‘sock_valbool_flag’
make[2]: *** [/tmp/vmware-config3/vmnet-only/bridge.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config3/vmnet-only] 错误 2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.14-69.fc8-i686'
make: *** [vmnet.ko] 错误 2
make: Leaving directory `/tmp/vmware-config3/vmnet-only'
Unable to build the vmnet 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.
如果这里错了,又要怎么改?  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航:
博客园   IT新闻   Chat2DB   C++博客   博问