红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

debian4下无法安装vmware的解决

发布时间:2007-07-15 16:49:38来源:红联作者:Uaprjuy
最近需要在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;
> }

保存后,重新安装即可。
文章评论

共有 1 条评论

  1. pros 于 2009-03-08 14:37:57发表:

    duo xie