打开vmware
发现启动不了…
写这是updater 淦,怕不是vmware自动升级导致他没法启动了
报错[Before you can run VMware several modules must be compiled]
点击install之后继续报错
重启大法 ,无效 , 好吧
咋根据他给的报错日志路径找到报错日志
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/userif.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/bridge.c:53: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/bridge.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetUserListener.c:39: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/vnetUserListener.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/smac_compat.c:53: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/smac_compat.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/hub.c:43: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/hub.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/netif.c:43: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/procfs.c:43: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 In file included from /tmp/modconfig-0wFZx5/vmnet-only/vm_atomic.h:49, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnet.h:28, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/vnetInt.h:24, 2022-04-28T02:28:35.686Z In(05) host-19294 from /tmp/modconfig-0wFZx5/vmnet-only/driver.c:48: 2022-04-28T02:28:35.686Z In(05) host-19294 /tmp/modconfig-0wFZx5/vmnet-only/vm_assert.h:43:10: fatal error: stdarg.h: No such file or directory 2022-04-28T02:28:35.686Z In(05) host-19294 43 | #include <stdarg.h> 2022-04-28T02:28:35.686Z In(05) host-19294 | ^~~~~~~~~~ 2022-04-28T02:28:35.686Z In(05) host-19294 compilation terminated. 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/netif.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/procfs.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 make[2]: *** [scripts/Makefile.build:287: /tmp/modconfig-0wFZx5/vmnet-only/driver.o] Error 1 2022-04-28T02:28:35.686Z In(05) host-19294 make[1]: *** [Makefile:1852: /tmp/modconfig-0wFZx5/vmnet-only] Error 2 2022-04-28T02:28:35.686Z In(05) host-19294 make: *** [Makefile:117: vmnet.ko] Error 2 2022-04-28T02:28:35.686Z In(05) host-19294 Unable to install all modules. See log for details. 2022-04-28T02:28:35.686Z In(05) host-19294
|
一部分的报错日志
然后发现编译的时候缺少stdarg.h
的依赖库,寻思着是没找到这个依赖库,然后google一波
解决方案1
我用这个没成功
有一个用vmware-modconfig工具来尝试解决的
find /usr -name "stdarg.h"
然后把列出来的stdarg.h的路径填入下面的CPATH尝试
sudo CPATH=[stdarg.h所在的path] vmware-modconfig --console --install-all
但是我这里失败了,可能有成功的情况
解决方案2
最后在vmware论坛的一个回复里找到了[解决方案][https://communities.vmware.com/t5/VMware-Workstation-Pro/VM-Workstation-16-1-gt-16-2-1-on-Ubuntu-21-10-broke-everything/m-p/2885277/highlight/true#M173211]
简单翻译一些,他步骤写非常详细:
导航到/usr/lib/vmware/modules/source/
分别通过sudo tar xvf命令解压vmmon.tar
vmnet.tar
编辑 vmmon-only/include/vm_asm_x86.h
注释65,66,67,68,69,70 和 72 行
也就是这样
1 2 3 4 5 6 7 8
| 65 //#ifndef USE_UBSAN 66 //#define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) \ 67 // ASSERT_ON_COMPILE(sizeof(Selector) == 2 && \ 68 // ((__builtin_constant_p(expr) && ((expr) >> 16) == 0) || \ 69 // sizeof(expr) <= 2)) 70 //#else 71 #define ASSERT_ON_COMPILE_SELECTOR_SIZE(expr) <<<---- DO NOT COMMENT OUT this line 72 //#endif
|
cd..
退到/usr/lib/vmware/modules/source/vmmon-only
目录运行sudo make
这里注意,如果编译失败的话可以用(我直接make还是失败了,需要手动指定CPATH环境变量)
sudo CPATH=[stdarg.h所在的path] make
来解决,也就是上面那个解决方案的方式(这里其实是参考了上一种解决方案)
我这里就指定了一下CPATH然后编译成功了,只要不error就行warning忽略就行
然后cd到vmnet-only
目录下,继续编译sudo CPATH=[stdarg.h所在的path] make
然后返回/usr/lib/vmware/modules/source
目录
执行四条命令
sudo cp vmmon.o /lib/modules/
uname -r/kernel/drivers/misc/vmmon.ko
sudo cp vmnet.o /lib/modules/
uname -r/kernel/drivers/misc/vmnet.ko
sudo depmod -a
sudo systemctl restart vmware.service
然后再从图标点开vmware就可以了
让我们谢谢这个老哥
thx :) sabennett
对了
最后别忘了关更新
参考