Linux vmware 编译模块失败。 Vmware player Unable to install all modules.

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

这样就是成功了。

  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值