我有一个与(非常相似的问题)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
答案1
我也遇到了同样的问题,这可能是一个可行的解决方案。同样的解决方法也被接受为解决方案VMware 社区。 从Charly 的回答在在 18.04 上安装 VMware:无法构建 vmmon:
根据创建脚本文件mkucebek 的 github 源代码,并在每次需要时运行它,通常是在安装新内核时:
#!/bin/bash
VMWARE_VERSION=workstation-15.0.4
TMP_FOLDER=/tmp/patch-vmware
rm -fdr $TMP_FOLDER
mkdir -p $TMP_FOLDER
cd $TMP_FOLDER
git clone https://github.com/mkubecek/vmware-host-modules.git
cd $TMP_FOLDER/vmware-host-modules
git checkout $VMWARE_VERSION
git fetch
make
sudo make install
sudo rm /usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1
/usr/lib/vmware/lib/libz.so.1/libz.so.1
sudo /etc/init.d/vmware restart