Vmware player Unable to install all modules. See log for details

ubuntu下的vmware play经常会让更新模块。一起点击确认就可以正常编译更新。

而且一定要编译后才能打开虚拟机系统

但是奇怪的是,最近一次点击 更新,报错:

显示的英文错误信息:

Unable to install all modules. See log for details

看了日志:

 26 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmmon-only/./include/vm_assert.h:372:22: note: in definition of macro ‘ASSERT_ON_COMPILE’
 25 2022-07-15T02:15:09.595Z In(05) host-7426   372 |       _Static_assert(e, #e); \
 24 2022-07-15T02:15:09.595Z In(05) host-7426       |                      ^
 23 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmmon-only/./include/vm_asm_x86.h:215:7: note: in expansion of macro ‘ASSERT_ON_COMPILE_SELECTOR_SIZE’
 22 2022-07-15T02:15:09.595Z In(05) host-7426   215 |       ASSERT_ON_COMPILE_SELECTOR_SIZE(expr);                           \
 21 2022-07-15T02:15:09.595Z In(05) host-7426       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 20 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmmon-only/./include/vm_asm_x86.h:227:22: note: in expansion of macro ‘SET_SEGREG’
 19 2022-07-15T02:15:09.595Z In(05) host-7426   227 | #define SET_GS(expr) SET_SEGREG(gs, expr)
 18 2022-07-15T02:15:09.595Z In(05) host-7426       |                      ^~~~~~~~~~
 17 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmmon-only/common/task.c:2726:10: note: in expansion of macro ‘SET_GS’
 16 2022-07-15T02:15:09.595Z In(05) host-7426  2726 |          SET_GS(gs);
 15 2022-07-15T02:15:09.595Z In(05) host-7426       |          ^~~~~~
 14 2022-07-15T02:15:09.595Z In(05) host-7426 make[2]: *** [scripts/Makefile.build:285: /tmp/modconfig-PB4afO/vmmon-only/common/task.o] Error 1
 13 2022-07-15T02:15:09.595Z In(05) host-7426 make[2]: *** Waiting for unfinished jobs....
 12 2022-07-15T02:15:09.595Z In(05) host-7426 make[1]: *** [Makefile:1875: /tmp/modconfig-PB4afO/vmmon-only] Error 2
 11 2022-07-15T02:15:09.595Z In(05) host-7426 make: *** [Makefile:117: vmmon.ko] Error 2
 10 2022-07-15T02:15:09.595Z In(05) host-7426 Using kernel build system.
  9 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmnet-only/driver.c: In function ‘VNetFileOpUnlockedIoctl’:
  8 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmnet-only/driver.c:966:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  7 2022-07-15T02:15:09.595Z In(05) host-7426   966 |       {
  6 2022-07-15T02:15:09.595Z In(05) host-7426       |       ^
  5 2022-07-15T02:15:09.595Z In(05) host-7426 /tmp/modconfig-PB4afO/vmnet-only/driver.c:976:4: note: here
  4 2022-07-15T02:15:09.595Z In(05) host-7426   976 |    case SIOCGETAPIVERSION:
  3 2022-07-15T02:15:09.595Z In(05) host-7426       |    ^~~~
  2 2022-07-15T02:15:09.595Z In(05) host-7426 Skipping BTF generation for /tmp/modconfig-PB4afO/vmnet-only/vmnet.ko due to unavailability of vmlinux
  1 2022-07-15T02:15:09.595Z In(05) host-7426 Unable to install all modules.  See log for details.

报错信息在这里:

host-7426 Skipping BTF generation for /tmp/modconfig-PB4afO/vmnet-only/vmnet.ko due to unavailability of vmlinux

host-7426 Unable to install all modules.  See log for details

遇到问题后就google一番。

果然还是老外大神多。

翻了一个解决方案后,终于找到一个可行的。【所以必须的英语水平还是要的】

可行的方案:

去github下载最新的host-modules

https://github.com/mkubecek/vmware-host-modules

vmware host modules VMMON and VMNET

下载一个最新的。

然后解压:

unzip w16.2.3-k5.17.zip

得到以下文件

INSTALL  
LICENSE  
Makefile  
README  
vmmon-only    
vmnet-only  

然后我们打包两个文件夹

vmmon-only
vmnet-only

tar -cf vmmon.tar vmmon-only
tar -cf vmnet.tar vmnet-only

这时,文件夹下多了2个tar的文件,vmmon.tar和vmnet.tar

然后拷贝到 目录:

/usr/lib/vmware.modules.source

sudo cp -v vmmon.tar vmnet.tar /usr/lib/vmware/modules/source/

之后可以直接编译:

sudo vmware-modconfig --console --install-all

Install vmware-host-modules - VMMON and VMNET

安装完成之后,再次打开vmware player就可以看到:

Accept terms and conditions Vmware

这样就是成功了。

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐