歸納了一下VMware安裝失敗的原因,大致如下:
◎因compiler、kernel source等尚未安裝
◎安裝/編譯時找不到bitops.h檔正確的位置
安裝方式:
1)
install g++-3.4 (會自動將gcc-3.4也裝起來)
2)
install build-essential
3)
install linux-headers-2.6.24-16(這是我系統的kernel版本,請先執行uname -r,找出你的版本),若沒有,請把它安裝起來吧
4)
$ sudo ./vmware-install.pl
......
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-16-generic/build/include]
Extracting the sources of the vmmon module.
Building the vmmon module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/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-config0/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config0/vmmon-only/common/comport.o
CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o
在包含自 include/asm/bitops.h:2 的檔案中,
從 /tmp/vmware-config0/vmmon-only/./include/vcpuset.h:74,
從 /tmp/vmware-config0/vmmon-only/./include/modulecall.h:23,
從 /tmp/vmware-config0/vmmon-only/common/vmx86.h:18,
從 /tmp/vmware-config0/vmmon-only/common/hostif.h:18,
從 /tmp/vmware-config0/vmmon-only/common/cpuid.c:14:
include/asm/bitops_32.h:9:2: 錯誤: #error only
make[2]: *** [/tmp/vmware-config0/vmmon-only/common/cpuid.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/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.
雖說compiler及一些必需的source已裝妥,但卻出現一些error,請參照 5)將安裝程序完成
5)
由於VMware在安裝過程中會產生一些暫存檔,請先移除之,再重新安裝!
$ sudo rm -rf /tmp/vmware-config*
$ sudo ./vmware-install.pl
......
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.24-16-generic/build/include]
Extracting the sources of the vmmon module.
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'
安裝至此,接下來要考驗手指的速度了,請迅速按下 Ctrl+z,暫停前景正執行的程序,並修改下面的script
$ sudo vi /tmp/vmware-config0/vmmon-only/include/vcpuset.h
★change line 74 from: #include “asm/bitops.h” to: #include “linux/bitops.h”
存檔後並執行 fg,讓先前的安裝程序繼續完成即可!
參考資源:
成功在ubuntu8.04上安装vmplayer2.03(详细步骤)
新内核安装VMware,编译错误的解决
[Solution] FC8 Kernel 2.6.24.3-12.fc8 下 VMware Workstation 無法正確 Compile
沒有留言:
張貼留言