Parallels Desktop 版本 16.5.0 (49183) 上安装号 Rocky Linux 8.4 以后,安装 Parallels Tools 是报错:
/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c:119:21: error: 'MS_RDONLY' undeclared
解决方法,给 super.c 打个patch:
#!/usr/bin/env bash
if [[ ! -d "/run/media/$(whoami)/Parallels Tools" ]]; then
echo "Please mount parallels tools disk before install"
exit
fi
echo "Copy install files to /tmp/parallels_fixed"
cp -rf "/run/media/$(whoami)/Parallels Tools" /tmp/parallels_fixed
chmod -R 755 /tmp/parallels_fixed
cd /tmp/parallels_fixed/kmods
echo "Unpack prl_mod.tar.gz"
tar -xzf prl_mod.tar.gz
rm prl_mod.tar.gz
echo "Patch prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c"
sed '1i\#include <uapi/linux/mount.h>' -i prl_fs/SharedFolders/Guest/Linux/prl_fs/super.c
echo "Repack prl_mod.tar.gz"
tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods > /dev/null
cd /tmp/parallels_fixed
echo "Start install"
sudo ./install
echo "Remove /tmp/parallels_fixed"
rm -rf /tmp/parallels_fixed
参阅:
《“Parallels Desktop 安装 Rocky Linux 报错”》 有 1 条评论
[…] 我在 Parallels Desktop 里安装的时候踩了个小坑,供参考: https://cumt.org/blog/769 […]