问题
安装Parallel Tools 在kali或者其他linux系统中,可能会出现以下报错:
An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information.
打开后发现是类似这样的报错
Start installation or upgrade of Guest Tools new version of parallels tools Installed Guest Tools were not found Perform installation into the /usr/lib/parallels-tools directory cat: /usr/lib/parallels-tools/kmods/../version: No such file or directory Start installation of prl_eth kernel module make: Entering directory `/usr/lib/parallels-tools/kmods' cd prl_eth/pvmnet && make make: Entering directory `/usr/lib/parallels-tools/kmods/prl_eth/pvmnet' make -C /lib/modules/3.11.0-24-generic/build M=/usr/lib/parallels-tools/kmods/prl_eth/pvmnet make: Entering directory `/usr/src/linux-headers-3.11.0-24-generic' LD /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/built-in.o CC /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/pvmnet.o LD /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.o Building modules, stage 2. MODPOST 1 modules CC /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.mod.o LD /usr/lib/parallels-tools/kmods/prl_eth/pvmnet/prl_eth.ko make: Leaving directory `/usr/src/linux-headers-3.11.0-24-generic' make: Leaving directory `/usr/lib/parallels-tools/kmods/prl_eth/pvmnet' cd prl_tg/Toolgate/Guest/Linux/prl_tg && make make: Entering directory `/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg' make -C /lib/modules/3.11.0-24-generic/build SUBDIRS=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg SRCROOT=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg modules make: Entering directory `/usr/src/linux-headers-3.11.0-24-generic' CC /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function ‘prl_tg_write’: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:796: error: implicit declaration of function ‘PDE’ /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:796: error: invalid type argument of ‘->’ (have ‘int’) /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c: In function ‘prl_tg_init_one’: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:1303: error: implicit declaration of function ‘create_proc_entry’ /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:1303: warning: assignment makes pointer from integer without a cast /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:1305: error: dereferencing pointer to incomplete type /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c:1306: error: dereferencing pointer to incomplete type make: *** Error 1 make: *** Error 2 make: Leaving directory `/usr/src/linux-headers-3.11.0-24-generic' make: *** Error 2 make: Leaving directory `/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg' make: *** Error 2 make: Leaving directory `/usr/lib/parallels-tools/kmods' Error: could not build kernel modules Error: failed to install kernel modules 2020-06-08T21:44:00+0800: execCmd: ./install --install 2020-06-08T21:44:00+0800: Error: An error occurred when installing Parallels Tools. Please go to /var/log/parallels-tools-install.log for more information. 2020-06-08T21:44:02+0800: Exiting with code 1
阅读后明显发现,是could not build kernel modules 与failed to install kernel modules出现问题
网上没有很完整的解决办法,这里写一篇帖子详细描述下
查阅资料发现,是linux升级内核版本后修改了一个参数的名字,详情见内核修改清单,导致编译时无法调用参数里的结构体。
我们将cd中的内容全部复制出来。
步骤一
解压kmods目录的prl_mod.tar.gz
cd kmods tar -xzf prl_mod.tar.gz
将以下文件中的“file_operations”修改为“proc_ops”
prl_fs/SharedFolders/Guest/Linux/prl_fs/
–prlfs_compat.h
修改后:
–super.c
修改前:
修改后:
prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze
–prl_fs_freeze.c
修改后:
–prlfs_freeze_compat.h
修改后:
prl_tg/Toolgate/Guest/Linux/prl_tg
–prltg_common.h
修改后:
–prltg.c
修改后:
prl_vid/Video/Guest/Linux/kmod
–prlvtg.c
修改后:
步骤二
修改完成后使用make命令查看是否报错
无报错使用make clean清除后重新打包
rm prl_mod.tar.gz tar -zcvf prl_mod.tar.gz .
若报错:'ERROR: "call_tg_sync" [/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko] undefined!
请在prl_fs/SharedFolders/Guest/Linux/prl_fs/Makefile添加
KBUILD_EXTRA_SYMBOLS := /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Module.symvers
在prl_vid/Video/Guest/Linux/kmod/Makefile添加相同语句
重新打包
rm prl_mod.tar.gz tar -zcvf prl_mod.tar.gz .
运行./install,即可正常安装parallel tools