升级ParalleslDesktop 后Parallels Tools安装失败

1. 我是Ubuntu20.04  arm 系统 ,  最近提示虚拟机可以升级了, 然后 手欠从Parallels Desktop 19.2 升级到19.3 后,再进入系统后,开始安装Parallels Tools ,结果怎么都安装不了,一直是失败的 。

2. 我以为是之前的没有卸载,然后我就 手动 执行了 sudo ./install ,然后提示 安装还是卸载,然后我卸载了,重启系统,再重新执行 sudo ./install ,结果还是安装失败。 

网上查了好多资料,还是没有找到真正的解决方案。只能自己排查问题了。 

 然后进入 sudo vi  /var/log/parallels-tools-install.log 查看失败日志,结果 出现 下面的内容 

Fri 22 Mar 2024 11:25:01 PM CST
Start installation or upgrade of Guest Tools
installer:%10.000000
installer:%20.000000
Installed Guest Tools were not found
Register service to install new Guest Tools
installer:%30.000000
Perform installation into the /usr/lib/parallels-tools directory
installer:%40.000000
make: Entering directory '/usr/lib/parallels-tools/kmods'
Kernel version file: CC="/lib/modules/5.4.0-173-generic/build/include/generated/uapi/linux/version.h".
Raw kernel version: "#define LINUX_VERSION_CODE 328959"
Kernel version code: CC="328959".
Raw LINUX_COMPILER value: "#define LINUX_COMPILER "gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)""
Linux kernel CC version: 9.4.0-1ubuntu1~20.04.2)
Default compiler: "cc".
Default compiler version: 	7.5.0
Searching for compiler 9.4.0-1ubuntu1~20.04.2) due to version mismatch.
Will use compiler CC="cc".
Compiler version "cc (Ubuntu/Linaro 7.5.0-6ubuntu2) 7.5.0
cd prl_tg/Toolgate/Guest/Linux/prl_tg && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
1: /lib/modules/5.4.0-173-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2
Start compile prl_tg...
make -C /lib/modules/5.4.0-173-generic/build M=/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 CC=cc modules
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-173-generic'
1: /lib/modules/5.4.0-173-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2
  CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o
cc: error: unrecognized command line option '-mstack-protector-guard=sysreg'; did you mean '-fstack-protector-strong'?
cc: error: unrecognized command line option '-mstack-protector-guard-reg=sp_el0'; did you mean '-fstack-protector-all'?
cc: error: unrecognized command line option '-mstack-protector-guard-offset=1328'; did you mean '-fstack-protector-strong'?
make[3]: *** [scripts/Makefile.build:270: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o] Error 1
make[2]: *** [Makefile:1778: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-173-generic'
make[1]: *** [Makefile:44: prl_tg] Error 2
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
make: *** [Makefile.kmods:68: compile] Error 2
make: Leaving directory '/usr/lib/parallels-tools/kmods'
Error: could not build kernel modules
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/5.4.0-173-generic
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/5.4.0-173-generic
Error: failed to install Parallels Guest Tools!
Trying to restore previous Parallels Guest Tools installation...

在百思不得其解时,准备重新安装ubuntu arm 虚拟机时,突然想起,我之前给这个系统 做过快照,然后进入旧快照,提示安装 parallels tools ,结果安装成功。然后,我就查看了一下安装成功后的日志,

eturn code from apt-get update is 0
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Selecting previously unselected package binfmt-support.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 155042 files and directories currently installed.)
Preparing to unpack .../binfmt-support_2.2.0-2_arm64.deb ...
Unpacking binfmt-support (2.2.0-2) ...
Setting up binfmt-support (2.2.0-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service -> /lib/systemd/system/binfmt-support.service.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.20) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Selecting previously unselected package dpkg-dev.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 155055 files and directories currently installed.)
Preparing to unpack .../00-dpkg-dev_1.19.7ubuntu3.2_all.deb ...
Unpacking dpkg-dev (1.19.7ubuntu3.2) ...
Selecting previously unselected package libstdc++-9-dev:arm64.
Preparing to unpack .../01-libstdc++-9-dev_9.4.0-1ubuntu1~20.04.2_arm64.deb ...
Unpacking libstdc++-9-dev:arm64 (9.4.0-1ubuntu1~20.04.2) ...
Selecting previously unselected package g++-9.
Preparing to unpack .../02-g++-9_9.4.0-1ubuntu1~20.04.2_arm64.deb ...
Unpacking g++-9 (9.4.0-1ubuntu1~20.04.2) ...
Selecting previously unselected package g++.
Preparing to unpack .../03-g++_4%3a9.3.0-1ubuntu2_arm64.deb ...
Unpacking g++ (4:9.3.0-1ubuntu2) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../04-build-essential_12.8ubuntu1.1_arm64.deb ...
Unpacking build-essential (12.8ubuntu1.1) ...
Selecting previously unselected package dctrl-tools.
Preparing to unpack .../05-dctrl-tools_2.24-3_arm64.deb ...
Unpacking dctrl-tools (2.24-3) ...
Selecting previously unselected package dkms.
Preparing to unpack .../06-dkms_2.8.1-5ubuntu2_all.deb ...
Unpacking dkms (2.8.1-5ubuntu2) ...
Selecting previously unselected package libfakeroot:arm64.
Preparing to unpack .../07-libfakeroot_1.24-1_arm64.deb ...
Unpacking libfakeroot:arm64 (1.24-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../08-fakeroot_1.24-1_arm64.deb ...
Unpacking fakeroot (1.24-1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../09-libalgorithm-diff-perl_1.19.03-2_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-2) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../10-libalgorithm-diff-xs-perl_0.04-6_arm64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-6) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../11-libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Setting up libstdc++-9-dev:arm64 (9.4.0-1ubuntu1~20.04.2) ...
Setting up libalgorithm-diff-perl (1.19.03-2) ...
Setting up libfakeroot:arm64 (1.24-1) ...
Setting up dpkg-dev (1.19.7ubuntu3.2) ...
Setting up fakeroot (1.24-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up g++-9 (9.4.0-1ubuntu1~20.04.2) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.8ubuntu1.1) ...
Setting up libalgorithm-diff-xs-perl (0.04-6) ...
Setting up dctrl-tools (2.24-3) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up dkms (2.8.1-5ubuntu2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.14) ...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
Selecting previously unselected package zlib1g-dev:arm64.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 156306 files and directories currently installed.)
Preparing to unpack .../zlib1g-dev_1%3a1.2.11.dfsg-2ubuntu1.5_arm64.deb ...
Unpacking zlib1g-dev:arm64 (1:1.2.11.dfsg-2ubuntu1.5) ...
Selecting previously unselected package libelf-dev:arm64.
Preparing to unpack .../libelf-dev_0.176-1.1ubuntu0.1_arm64.deb ...
Unpacking libelf-dev:arm64 (0.176-1.1ubuntu0.1) ...
Setting up zlib1g-dev:arm64 (1:1.2.11.dfsg-2ubuntu1.5) ...
Setting up libelf-dev:arm64 (0.176-1.1ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
Previous version was not found. Nothing to backup.
installer:%0.000000
modprobe: FATAL: Module prl_tg not found in directory /lib/modules/5.4.0-169-generic

Fri Mar 22 17:01:13 UTC 2024
Start installation or upgrade of Guest Tools
installer:%10.000000
installer:%20.000000
Installed Guest Tools were not found
Register service to install new Guest Tools
installer:%30.000000
Perform installation into the /usr/lib/parallels-tools directory
installer:%40.000000
make: Entering directory '/usr/lib/parallels-tools/kmods'
Kernel version file: CC="/lib/modules/5.4.0-169-generic/build/include/generated/uapi/linux/version.h".
Raw kernel version: "#define LINUX_VERSION_CODE 328959"
Kernel version code: CC="328959".
Raw LINUX_COMPILER value: "#define LINUX_COMPILER "gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)""
Linux kernel CC version: 9.4.0-1ubuntu1~20.04.2)
Default compiler: "cc".
Default compiler version: 	9.4.0
Searching for compiler 9.4.0-1ubuntu1~20.04.2) due to version mismatch.
Will use compiler CC="cc".
Compiler version "cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
cd prl_tg/Toolgate/Guest/Linux/prl_tg && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
1: /lib/modules/5.4.0-169-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2
Start compile prl_tg...
make -C /lib/modules/5.4.0-169-generic/build M=/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 CC=cc modules
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-169-generic'
1: /lib/modules/5.4.0-169-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2
  CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.o
  CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_call.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.o
1: /lib/modules/5.4.0-169-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.mod.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-169-generic'
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
cp -f prl_tg/Toolgate/Guest/Linux/prl_tg/*.symvers prl_fs/SharedFolders/Guest/Linux/prl_fs ||:
cd prl_fs/SharedFolders/Guest/Linux/prl_fs && make CC=cc KBUILD_EXTRA_SYMBOLS=/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Module.symvers
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
make -C /lib/modules/5.4.0-169-generic/build M=/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs CC=cc
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-169-generic'
  AR      /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/built-in.a
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/super.o
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.o
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/file.o
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/interface.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.mod.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-169-generic'
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs'
cd prl_notifier/Installation/lnx/prl_notifier && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier'
Start compile prl_notifier...
make -C /lib/modules/5.4.0-169-generic/build M=/usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier SRCROOT=/usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier CC=cc modules
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-169-generic'
  CC [M]  /usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier/prlnotifier.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier/prl_notifier.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier/prl_notifier.mod.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier/prl_notifier.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-169-generic'
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_notifier/Installation/lnx/prl_notifier'
cd prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze'
make -C /lib/modules/5.4.0-169-generic/build M=/usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze CC=cc modules
make[2]: Entering directory '/usr/src/linux-headers-5.4.0-169-generic'
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.mod.o
  LD [M]  /usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.4.0-169-generic'
make[1]: Leaving directory '/usr/lib/parallels-tools/kmods/prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze'
make: Leaving directory '/usr/lib/parallels-tools/kmods'
Start installation of prl_tg kernel module
Start installation of prl_fs kernel module
Start installation of prl_fs_freeze kernel module
Start installation of prl_notifier kernel module

Creating symlink /var/lib/dkms/parallels-tools/19.3.0.54924/source ->
                 /usr/src/parallels-tools-19.3.0.54924

DKMS: add completed.
DKMS modules were added successfully
DKMS modules for kernel 5.4.0-169-generic were built successfully
DKMS modules for kernel 5.4.0-169-generic were installed successfully
installer:%50.000000
installer:%60.000000
installer:%70.000000
Installing libPrlWl.so.1 (aarch64) ...
'/usr/lib/parallels-tools/tools/tools-arm64/lib/libPrlWl.so.1.0.0' -> '/lib/aarch64-linux-gnu/libPrlWl.so.1'
Running ldconfig...
'/home/leo/Desktop/Parallels Shared Folders' -> '/media/psf'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prltimesync' -> '/usr/bin/prltimesync'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prltoolsd' -> '/usr/bin/prltoolsd'
'/media/leo/Parallels Tools/installer/prltoolsd.service' -> '/etc/systemd/system//prltoolsd.service'
Created symlink /etc/systemd/system/multi-user.target.wants/prltoolsd.service -> /etc/systemd/system/prltoolsd.service.
'/media/leo/Parallels Tools/installer/prltools-reconfig.service' -> '/etc/systemd/system//prltools-reconfig.service'
Created symlink /etc/systemd/system/multi-user.target.wants/prltools-reconfig.service -> /etc/systemd/system/prltools-reconfig.service.
'/usr/lib/parallels-tools/tools/prlfsmountd.sh' -> '/usr/bin/prlfsmountd'
'/usr/lib/parallels-tools/tools/prlbinfmtconfig.sh' -> '/usr/bin/prlbinfmtconfig'
Warning: no semanage found in system
Not changing type for /usr/lib/parallels-tools/tools/../installer.
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlcc' -> '/usr/bin/prlcc'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prldnd' -> '/usr/bin/prldnd'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlcp' -> '/usr/bin/prlcp'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlsga' -> '/usr/bin/prlsga'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlhosttime' -> '/usr/bin/prlhosttime'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prl_showvmcfg' -> '/usr/bin/prl_showvmcfg'
'/usr/lib/parallels-tools/tools/tools-arm64/sbin/prl_nettool' -> '/usr/sbin/prl_nettool'
'/usr/lib/parallels-tools/tools/tools-arm64/sbin/prl_snapshot' -> '/usr/sbin/prl_snapshot'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlshprof' -> '/usr/bin/prlshprof'
'/usr/lib/parallels-tools/tools/tools-arm64/bin/prlshprint' -> '/usr/bin/prlshprint'
'/etc/xdg/autostart/prlcc.desktop' -> '/usr/lib/parallels-tools/tools/prlcc.desktop'
'/usr/share/gnome/autostart/prlcc.desktop' -> '/usr/lib/parallels-tools/tools/prlcc.desktop'
'/usr/lib/parallels-tools/tools/tools-arm64/sbin/prl-opengl-switcher.sh' -> '/usr/sbin/prl-opengl-switcher.sh'
'/usr/lib/parallels-tools/tools/mount.prl_fs.8' -> '/usr/share/man/man8/mount.prl_fs.8'
'/usr/lib/parallels-tools/tools/99prltoolsd-hibernate' -> '/etc/pm/sleep.d/99prltoolsd-hibernate'
'/usr/bin/ptiagent' -> '/usr/lib/parallels-tools/installer/ptiagent-wrapper.sh'
'/usr/bin/ptiagent-cmd' -> '/usr/lib/parallels-tools/installer/ptiagent-cmd'
'/etc/xdg/autostart/ptiagent.desktop' -> '/usr/lib/parallels-tools/tools/ptiagent.desktop'
'/usr/share/gnome/autostart/ptiagent.desktop' -> '/usr/lib/parallels-tools/tools/ptiagent.desktop'
'/usr/lib/parallels-tools/tools/parallels-tools.png' -> '/usr/share/icons/hicolor/48x48/apps/parallels-tools.png'
Perform initramfs update.
'/media/leo/Parallels Tools/installer/parallels_tools.initramfs-hook' -> '/usr/share/initramfs-tools/hooks/parallels_tools'
update-initramfs: Generating /boot/initrd.img-5.4.0-169-generic
installer:%80.000000
Send installed Parallels Tools version to dispatcher.
installer:%90.000000
>>> Postinstall
Writing OS version and Xorg version
Enabling PRL_GL
Starting prltoolsd service:
Mask suspend service unit (since virtio-gpu doesn't support suspend/resume):
'/usr/lib/parallels-tools/tools/prl-nosuspend.conf' -> '/etc/systemd/sleep.conf.d/prl-nosuspend.conf'
'/usr/lib/parallels-tools/tools/99prl-nosuspend' -> '/etc/pm/sleep.d/99prl-nosuspend'
installer:%100.000000
Parallels Guest Tools were installed successfully!
Please, reboot your OS to finish installation of Parallels Guest Tools.

日志太长,没看出来什么问题,然后我用beyond compare 比较发一下,发现一个问题,就是gcc版本不对,安装失败的gcc是 7 版本。 安装成功的gcc 是9 版本,ubuntu 20.04 默认的gcc版本是9.4 ,我是因为需要安装一个xenomai,所以需要降级,才安装的版本7. 

Raw LINUX_COMPILER value: "#define LINUX_COMPILER "gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)""
Linux kernel CC version: 9.4.0-1ubuntu1~20.04.2)
Default compiler: "cc".
Default compiler version: 	7.5.0
Searching for compiler 9.4.0-1ubuntu1~20.04.2) due to version mismatch.
Will use compiler CC="cc".

 上面是失败的日志,下面是成功的日志,可以发现 gcc的版本是不是对,这才想起来,之前我给gcc版本降级过

make: Entering directory '/usr/lib/parallels-tools/kmods'
Kernel version file: CC="/lib/modules/5.4.0-169-generic/build/include/generated/uapi/linux/version.h".
Raw kernel version: "#define LINUX_VERSION_CODE 328959"
Kernel version code: CC="328959".
Raw LINUX_COMPILER value: "#define LINUX_COMPILER "gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)""
Linux kernel CC version: 9.4.0-1ubuntu1~20.04.2)
Default compiler: "cc".
Default compiler version: 	9.4.0
Searching for compiler 9.4.0-1ubuntu1~20.04.2) due to version mismatch.
Will use compiler CC="cc".
Compiler version "cc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
cd prl_tg/Toolgate/Guest/Linux/prl_tg && make CC=cc
make[1]: Entering directory '/usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg'
1: /lib/modules/5.4.0-169-generic/build
2: /usr/lib/parallels-tools/kmods/prl_tg/Toolgate/Guest/Linux/prl_tg
3: 20240322
4: 1.10.2

如果gcc版本不是 9.4 的,请安装 9版本。

我网上找了一个别人的代码,反正命令是通用的,先升级apt

gary@jxes:~$ sudo apt update


这是安装版本7的命令,如果想安装9, 就将 7改为 9,即可。 

gary@jxes:~$ sudo apt install build-essential
gary@jxes:~$ sudo apt install gcc-7 g++-7

 下面这几行代码 是重点,重点在于 sudo update-alternatives --config gcc 这一行,这一行,是选择gcc的版本(因为是多版本安装,所以要选择默认版本。)

gary@jxes:~$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
gary@jxes:~$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 --slave /usr/bin/gcov gcov /usr/bin/gcov-7
gary@jxes:~$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path            Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-9   90        auto mode
  1            /usr/bin/gcc-7   70        manual mode
  2            /usr/bin/gcc-9   90        manual mode

Press <enter> to keep the current choice[*], or type selection number: 1
gary@jxes:~$ gcc --version
gcc (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

这里如果想选择 版本 7 就输入 1  ,如果想选版本9 就输入 0 或 2 ,我是要恢复版本到9 ,所以选择了 0 

然后再安装 parallels tools ,安装成功!

省去我重新安装虚拟机了!!!!

  • 8
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值