当我尝试启动 VMWARE-WORKSTATION 时,出现以下错误:
在运行 VMware 之前,必须编译几个模块并将其加载到内核中 取消/安装
没有错误,当我选择安装时什么也没有发生,只是关闭。
我手动安装:
sudo apt-get 安装 open-vm-tools open-vm-tools-dev open-vm-dkms open-vm-toolbox open-vm-tools-dev
但已经安装到最新版本。
我将启动悬赏来修复此问题。
Ubuntu 13.04 64位
pst007x@pst007x-Serval-Professional:~$ uname -a
Linux pst007x-Serval-Professional 3.9.0-030900-generic #201304291257 SMP Mon Apr 29 16:58:15 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
我已经卸载并重新安装了所有组件,但问题仍然存在。
我尝试了不同的内核,但仍然遇到同样的问题。
按照建议尝试一下:这里
#!/bin/bash
cd
cp -prn /usr/lib/vmware/modules/source /usr/lib/vmware/modules/source-backup
mkdir fixed
cd fixed
find /usr/lib/vmware/modules/source -name "*.tar" -exec tar xf '{}' \;
## add missing header on kernels
sed -i '/#include "compat_wait.h"/a\#include "compat_sched.h"' vmnet-only/vnetUserListener.c
sed -i '/#include "compat_page.h"/a\#include "compat_sched.h"' vmci-only/include/pgtbl.h
## comment out an invalid definition
sed -i 's|\(extern void poll_initwait(compat_poll_wqueues \*);\)|//\1|' *-only/include/compat_wait.h
tar cf vmblock.tar vmblock-only
tar cf vmci.tar vmci-only
tar cf vmmon.tar vmmon-only
tar cf vmnet.tar vmnet-only
tar cf vmppuser.tar vmppuser-only
tar cf vsock.tar vsock-only
cp -p *.tar /usr/lib/vmware/modules/source
cd /lib/modules/`uname -r`/build/include/linux
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h
cd
vmware-modconfig --console --install-all
# clean up
cd
rm -rf fixed
cd /lib/modules/`uname -r`/build/include/linux
rm autoconf.h utsrelease.h
cd /usr/lib/vmware/modules/
rm -rf source-backup
cd
没有起作用,终端中的脚本结果:
pst007x@pst007x-Serval-Professional:~/Desktop$ sudo ./run
[sudo] password for pst007x:
sed: can't read vmci-only/include/pgtbl.h: No such file or directory
sed: can't read *-only/include/compat_wait.h: No such file or directory
tar: vmppuser-only: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
ln: failed to create symbolic link ‘./autoconf.h’: File exists
ln: failed to create symbolic link ‘./utsrelease.h’: File exists
Stopping VMware services:
VMware Authentication Daemon done
VM communication interface socket family done
Virtual machine communication interface done
Virtual machine monitor done
Blocking file system done
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-tGleah/vmmon-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-tGleah/vmmon-only/linux/driver.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/linux/driverLog.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/linux/hostif.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/apic.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/comport.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/cpuid.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/hashFunc.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/memtrack.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/phystrack.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/task.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/common/vmx86.o
CC [M] /tmp/modconfig-tGleah/vmmon-only/vmcore/moduleloop.o
LD [M] /tmp/modconfig-tGleah/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-tGleah/vmmon-only/vmmon.mod.o
LD [M] /tmp/modconfig-tGleah/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-tGleah/vmmon-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-tGleah/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/modconfig-tGleah/vmmon-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-tGleah/vmnet-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-tGleah/vmnet-only/driver.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/hub.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/userif.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/netif.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/bridge.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/filter.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/procfs.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/smac_compat.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/smac.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/vnetEvent.o
CC [M] /tmp/modconfig-tGleah/vmnet-only/vnetUserListener.o
LD [M] /tmp/modconfig-tGleah/vmnet-only/vmnet.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-tGleah/vmnet-only/vmnet.mod.o
LD [M] /tmp/modconfig-tGleah/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-tGleah/vmnet-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-tGleah/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/modconfig-tGleah/vmnet-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-tGleah/vmblock-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/block.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/control.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/dentry.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/file.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/filesystem.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/inode.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/module.o
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/stubs.o
/tmp/modconfig-tGleah/vmblock-only/linux/dentry.c:38:4: warning: initialisation from incompatible pointer type [enabled by default]
/tmp/modconfig-tGleah/vmblock-only/linux/dentry.c:38:4: warning: (near initialisation for ‘LinkDentryOps.d_revalidate’) [enabled by default]
/tmp/modconfig-tGleah/vmblock-only/linux/dentry.c: In function ‘DentryOpRevalidate’:
/tmp/modconfig-tGleah/vmblock-only/linux/dentry.c:104:7: warning: passing argument 2 of ‘actualDentry->d_op->d_revalidate’ makes integer from pointer without a cast [enabled by default]
/tmp/modconfig-tGleah/vmblock-only/linux/dentry.c:104:7: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’
CC [M] /tmp/modconfig-tGleah/vmblock-only/linux/super.o
/tmp/modconfig-tGleah/vmblock-only/linux/control.c: In function ‘ExecuteBlockOp’:
/tmp/modconfig-tGleah/vmblock-only/linux/control.c:285:9: warning: assignment from incompatible pointer type [enabled by default]
/tmp/modconfig-tGleah/vmblock-only/linux/control.c:296:4: warning: passing argument 1 of ‘putname’ from incompatible pointer type [enabled by default]
In file included from include/linux/proc_fs.h:5:0,
from /tmp/modconfig-tGleah/vmblock-only/linux/control.c:28:
include/linux/fs.h:2040:13: note: expected ‘struct filename *’ but argument is of type ‘char *’
/tmp/modconfig-tGleah/vmblock-only/linux/inode.c:49:4: warning: initialisation from incompatible pointer type [enabled by default]
/tmp/modconfig-tGleah/vmblock-only/linux/inode.c:49:4: warning: (near initialisation for ‘RootInodeOps.lookup’) [enabled by default]
LD [M] /tmp/modconfig-tGleah/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "putname" [/tmp/modconfig-tGleah/vmblock-only/vmblock.ko] undefined!
CC /tmp/modconfig-tGleah/vmblock-only/vmblock.mod.o
LD [M] /tmp/modconfig-tGleah/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-tGleah/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-tGleah/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/modconfig-tGleah/vmblock-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-tGleah/vmci-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-tGleah/vmci-only/linux/driver.o
CC [M] /tmp/modconfig-tGleah/vmci-only/linux/vmciKernelIf.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciContext.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciDoorbell.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciDriver.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciDatagram.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciEvent.o
CC [M] /tmp/modconfig-tGleah/vmci-only/common/vmciHashtable.o
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:127:4: error: initialiser element is not constant
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:127:4: error: (near initialisation for ‘vmci_driver.remove’)
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:1754:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:1982:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:2063:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:2137:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/modconfig-tGleah/vmci-only/linux/driver.c:1717:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/modconfig-tGleah/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/modconfig-tGleah/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/modconfig-tGleah/vmci-only'
Unable to install all modules. See log for details.
pst007x@pst007x-Serval-Professional:~/Desktop$
按照以下建议进行了尝试,但出现同样的问题:
pst007x@pst007x-Serval-Professional:~$ sudo vmware-modconfig --console --install-all
[sudo] password for pst007x:
Stopping VMware services:
VMware Authentication Daemon done
VM communication interface socket family done
Virtual machine communication interface done
Virtual machine monitor done
Blocking file system done
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-IFjtiM/vmmon-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/linux/driver.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/linux/driverLog.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/linux/hostif.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/apic.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/comport.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/cpuid.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/hashFunc.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/memtrack.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/phystrack.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/task.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/common/vmx86.o
CC [M] /tmp/modconfig-IFjtiM/vmmon-only/vmcore/moduleloop.o
LD [M] /tmp/modconfig-IFjtiM/vmmon-only/vmmon.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-IFjtiM/vmmon-only/vmmon.mod.o
LD [M] /tmp/modconfig-IFjtiM/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-IFjtiM/vmmon-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-IFjtiM/vmmon-only'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/modconfig-IFjtiM/vmmon-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-IFjtiM/vmnet-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/driver.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/hub.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/userif.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/netif.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/bridge.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/filter.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/procfs.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/smac_compat.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/smac.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/vnetEvent.o
CC [M] /tmp/modconfig-IFjtiM/vmnet-only/vnetUserListener.o
LD [M] /tmp/modconfig-IFjtiM/vmnet-only/vmnet.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/modconfig-IFjtiM/vmnet-only/vmnet.mod.o
LD [M] /tmp/modconfig-IFjtiM/vmnet-only/vmnet.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-IFjtiM/vmnet-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-IFjtiM/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory `/tmp/modconfig-IFjtiM/vmnet-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-IFjtiM/vmblock-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/block.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/control.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/file.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/filesystem.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/inode.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/module.o
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/stubs.o
/tmp/modconfig-IFjtiM/vmblock-only/linux/control.c: In function ‘ExecuteBlockOp’:
/tmp/modconfig-IFjtiM/vmblock-only/linux/control.c:285:9: warning: assignment from incompatible pointer type [enabled by default]
/tmp/modconfig-IFjtiM/vmblock-only/linux/control.c:296:4: warning: passing argument 1 of ‘putname’ from incompatible pointer type [enabled by default]
In file included from include/linux/proc_fs.h:5:0,
from /tmp/modconfig-IFjtiM/vmblock-only/linux/control.c:28:
include/linux/fs.h:2040:13: note: expected ‘struct filename *’ but argument is of type ‘char *’
/tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.c:38:4: warning: initialisation from incompatible pointer type [enabled by default]
/tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.c:38:4: warning: (near initialisation for ‘LinkDentryOps.d_revalidate’) [enabled by default]
/tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.c: In function ‘DentryOpRevalidate’:
/tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.c:104:7: warning: passing argument 2 of ‘actualDentry->d_op->d_revalidate’ makes integer from pointer without a cast [enabled by default]
/tmp/modconfig-IFjtiM/vmblock-only/linux/dentry.c:104:7: note: expected ‘unsigned int’ but argument is of type ‘struct nameidata *’
/tmp/modconfig-IFjtiM/vmblock-only/linux/inode.c:49:4: warning: initialisation from incompatible pointer type [enabled by default]
/tmp/modconfig-IFjtiM/vmblock-only/linux/inode.c:49:4: warning: (near initialisation for ‘RootInodeOps.lookup’) [enabled by default]
CC [M] /tmp/modconfig-IFjtiM/vmblock-only/linux/super.o
LD [M] /tmp/modconfig-IFjtiM/vmblock-only/vmblock.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "putname" [/tmp/modconfig-IFjtiM/vmblock-only/vmblock.ko] undefined!
CC /tmp/modconfig-IFjtiM/vmblock-only/vmblock.mod.o
LD [M] /tmp/modconfig-IFjtiM/vmblock-only/vmblock.ko
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory `/tmp/modconfig-IFjtiM/vmblock-only'
make[1]: `postbuild' is up to date.
make[1]: Leaving directory `/tmp/modconfig-IFjtiM/vmblock-only'
cp -f vmblock.ko ./../vmblock.o
make: Leaving directory `/tmp/modconfig-IFjtiM/vmblock-only'
Using 2.6.x kernel build system.
make: Entering directory `/tmp/modconfig-IFjtiM/vmci-only'
/usr/bin/make -C /lib/modules/3.9.0-030900-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-3.9.0-030900-generic'
CC [M] /tmp/modconfig-IFjtiM/vmci-only/linux/driver.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/linux/vmciKernelIf.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciContext.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciDatagram.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciDoorbell.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciDriver.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciHashtable.o
CC [M] /tmp/modconfig-IFjtiM/vmci-only/common/vmciEvent.o
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:127:4: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:127:4: error: initialiser element is not constant
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:127:4: error: (near initialisation for ‘vmci_driver.remove’)
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:1754:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_probe_device’
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:1982:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘vmci_remove_device’
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:119:12: warning: ‘vmci_probe_device’ used but never defined [enabled by default]
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:121:13: warning: ‘vmci_remove_device’ used but never defined [enabled by default]
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:2063:1: warning: ‘vmci_interrupt’ defined but not used [-Wunused-function]
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:2137:1: warning: ‘vmci_interrupt_bm’ defined but not used [-Wunused-function]
/tmp/modconfig-IFjtiM/vmci-only/linux/driver.c:1717:1: warning: ‘vmci_enable_msix’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/tmp/modconfig-IFjtiM/vmci-only/linux/driver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/tmp/modconfig-IFjtiM/vmci-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.9.0-030900-generic'
make: *** [vmci.ko] Error 2
make: Leaving directory `/tmp/modconfig-IFjtiM/vmci-only'
Unable to install all modules. See log for details.
pst007x@pst007x-Serval-Professional:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
pst007x@pst007x-Serval-Professional:~$
主持人:我已经尝试了其他帖子中的所有建议,但它们都没有解决这个特定问题。
这不是重复的,其他帖子没有解决这个特定问题,也没有提供任何解决方案
答案1
我也有同样的问题。经过一番 joojling(谷歌搜索),我通过以下步骤解决了我的问题:
(我不确定这是否会对我的问题产生任何影响)正如@pst007x 执行的
cd /lib/modules/$(uname -r)/build/include/linux sudo ln -s ../generated/utsrelease.h sudo ln -s ../generated/autoconf.h sudo ln -s ../generated/uapi/linux/version.h
我按照@Qasim 的建议运行了以下代码
sudo vmware-modconfig --console --install-all
我有 Ubuntu 13.04-64bit,由内核 3.8.0-21-generic 和 VMware Player 5.0.2 build-1031769 提供支持
祝你好运!
答案2
我认为问题在于您使用了错误的内核头文件,看起来其中一个建议是尝试使用 3.9.0 的内核头文件,而 13.04 不是使用内核版本 3.88 吗?尝试从 apt 获取内核头文件,执行以下操作:
sudo apt-get install linux-headers-$(uname -r)
(借自nixCraft)
然后尝试再次安装
答案3
当我从 12.10 升级到 13.04 时,我遇到了完全相同的问题。当我启动 VMware 时,我会收到相同的消息:
Before you can run VMware, several modules must be compiled and loaded into the kernel CANCEL / INSTALL
当我单击“安装”时,什么也没有发生。我检查了 /var/log/,apport 报告了以下错误:
ERROR: apport (pid 3061) Thu Apr 25 08:48:51 2013: executable: /usr/lib/vmware/bin/appLoader (command line "/usr/lib/vmware/bin/vmware-gksu --sudo-mode --message=Please\ enter\ your\ password\ to\ proceed. '/usr/bin/vmware-modconfig'\ --icon='vmware-workstation'\ --appname='VMware'")
/usr/lib/vmware/bin/vmware-gksu 似乎存在导致其崩溃的问题。每次运行该命令时,我都能可靠地重现该问题。我能够通过手动运行该命令来解决问题。以下是我运行的命令:
sudo apt-get install linux-headers-3.8.0-19-generic
sudo /usr/bin/vmware-modconfig --icon=vmware-workstation --appname=VMware
你在 /var/log/apport 中看到类似的内容了吗?
答案4
我找到了一个对我有用的解决方案这里:
git clone -b workstation-15.0.2 https://github.com/mkubecek/vmware-host-modules.git cd vmware-host-modules tar -cf vmmon.tar vmmon-only tar -cf vmnet.tar vmnet-only sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/ sudo vmware-modconfig --console --install-all
您可以将上面的 git 存储库名称中的 Workstation 版本替换为当前版本。