我有一个与( 15.04 VMWare Player“无法启动服务”错误)非常相似的问题,因为无法编译模块。
这是我使用的终端命令:
root@LesserArk:~# uname -r
5.0.0-13-generic
root@LesserArk:~# man dkms
root@LesserArk:~# curl https://pastebin.com/raw/Z1ihzbcE -o /tmp/vmnet-3.19.patch
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1646 0 1646 0 0 4485 0 --:--:-- --:--:-- --:--:-- 4485
root@LesserArk:~#
root@LesserArk:~# cd /usr/lib/vmware/modules/source
root@LesserArk:/usr/lib/vmware/modules/source# tar -xf vmnet.tar
root@LesserArk:/usr/lib/vmware/modules/source# cd vmnet-only
root@LesserArk:/usr/lib/vmware/modules/source/vmnet-only# patch -p0 -i /tmp/vmnet-3.19.patch
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur vmnet-only.a/driver.c vmnet-only/driver.c
|--- vmnet-only.a/driver.c 2014-11-20 20:13:56.000000000 -0500
|+++ vmnet-only/driver.c 2015-02-09 15:40:10.916640592 -0500
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
2 out of 2 hunks ignored
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 45
好吧,我遇到了同样的问题,这可能是一个可能的解决方案。VMware 社区也接受了相同的解决方法作为解决方案。来自Charly在 18.04上安装 VMware 的回答: Failed to build vmmon:
根据mkucebek 的 github 源创建一个脚本文件,并在每次需要时运行它,通常是在安装新内核时: