|
|
最近需要在debian4下用vmware来虚拟windows,但是我的vmware V6.0.0.45731无法安装,每次都出现下面错误
- Using 2.6.x kernel build system.
- make: Entering directory `/tmp/vmware-config0/vmmon-only'
- make -C /usr/src/linux-headers-2.6.18-4-amd64/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
- make[1]: Entering directory `/usr/src/linux-headers-2.6.18-4-amd64'
- 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/cpuid.o
- CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o
- CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o
- CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o
- CC [M] /tmp/vmware-config0/vmmon-only/common/task.o
- cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
- cc1plus: warning: command line option "-Wno-pointer-sign" is valid for C/ObjC but not for C++
- cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
- /tmp/vmware-config0/vmmon-only/common/task_compat.h: In function ‘void Task_Switch_V45(VMDriver*, Vcpuid)’:
- /tmp/vmware-config0/vmmon-only/common/task_compat.h:1713: warning: ‘sysenterState.SysenterStateV45::validEIP’ may be used uninitialized in this function
- /tmp/vmware-config0/vmmon-only/common/task_compat.h:1713: warning: ‘sysenterState.SysenterStateV45::cs’ may be used uninitialized in this function
- /tmp/vmware-config0/vmmon-only/common/task_compat.h:1713: warning: ‘sysenterState.SysenterStateV45::rsp’ may be used uninitialized in this function
- /tmp/vmware-config0/vmmon-only/common/task_compat.h:1713: warning: ‘sysenterState.SysenterStateV45::rip’ may be used uninitialized in this function
- CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o
- CC [M] /tmp/vmware-config0/vmmon-only/vmcore/compat.o
- CC [M] /tmp/vmware-config0/vmmon-only/vmcore/moduleloop.o
- LD [M] /tmp/vmware-config0/vmmon-only/vmmon.o
- Building modules, stage 2.
- MODPOST
- CC /tmp/vmware-config0/vmmon-only/vmmon.mod.o
- LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko
- make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-4-amd64'
- cp -f vmmon.ko ./../vmmon.o
- make: Leaving directory `/tmp/vmware-config0/vmmon-only'
- sh: line 1: 3390 Segmentation fault 'insmod' -p '/tmp/vmware-config0/vmmon.o' >/dev/null 2>&1
- Unable to make a vmmon module that can be loaded in the running kernel:
- There is probably a slight difference in the kernel configuration between the
- set of C header files you specified and your running kernel. You may want to
- rebuild a kernel based on that directory, or specify another directory.
- 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-config.pl文件,如下
- > sub check_answer_binpath {
- > my $answer = shift;
- > my $source = shift;
- >- my $fullpath;
- >+ my $fullpath = internal_which($answer);
- >
- >- if (not (internal_which($answer) eq '')) {
- >- return $answer;
- >+ if ($fullpath ne '') {
- >+ return $fullpath;
- > }
复制代码
保存后,重新安装即可 |
|