parallel desktop ubuntu從18.04更新到20.04(包括安裝Parallels Tools)


ubuntu是怎么更新到20.04的

只說正確的步驟(實際上不是這個順序)

  • 我之前用了清華鏡像源, 修改了/etc/apt/sources.list, 需要把它改回原樣, 這個鏈接就是原樣. 做這一步的原因是(報錯是), while scanning your repository information no entry about bionic could be found. An upgrade might not succeed.
  • 執行sudo apt list --installed | grep libappstream, 我看到有libappstream4, 再執行sudo apt-get purge libappstream4, 刪除這個包
    這一步對應的報錯(意思就是做這一步的原因)是: E:Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi', E:Sub-process returned an error code
  • sudo do-release-upgrade -d -f DistUpgradeViewGtk3, 然后等待就可以了

是怎么安裝Parallels Tools的

我很懷疑Parallels Tools沒有裝, 執行ls /media/psf, 也的確沒有看到任何目錄(本來應該有mac的Home目錄的), 因此需要重裝Parallels Tools

  • image.png

cd /media, ls, 就會看到有Parallels目錄, cd, 看到下面有一個目錄是Parallels Tools. cp -r到某個目錄, 比如home目錄.

之后就是參考這個鏈接. 也一樣遇到了報錯, 但這里我就只記錄對我可以work的步驟.

以下的操作都是在Parallels Tools目錄下進行的.

cd kmod
sudo tar -xzf prl_mod.tar.gz
sudo rm prl_mod.tar.gz
sudo vim prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h # 跳到16行, 加上#include <uapi/linux/mount.h> 
# 以下兩步編輯的原因是No rule to make target 'arch/x86/tools/relocs_32.c', needed by 'arch/x86/tools/relocs_32.o'.  Stop.
sudo vim ./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile # 第20行改為DRIVER_DIR ?= $(shell pwd), 本來是$(PWD)
sudo vim ./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26 # 第18行改為$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules, 本來沒有M=$(shell pwd)
sudo tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods
cd ../installer
sudo chmod 777 *.sh
sudo ./install-cli.sh -i --verbose
# 提示成功
reboot

這是我整合的步驟, 對應原文中的這兩個部分

In a very similar approach, copy the files from the Parallels
installation media and drop them in a folder somewhere (eg.
~/parallels_fixed)

Go to the kmods directory (cd ~/parallels_fixed/kmods) and extract the files (tar -xzf prl_mod.tar.gz)

Remove prl_mod.tar.gz file from that directory (rm prl_mod.tar.gz)

Find this file: ~/<your-folder-goes-here>/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/prlfs.h

Modify the file by going to line 16 and inserting a new line. Add this text: #include <uapi/linux/mount.h>

The file should now look like this. Save and exit.

..
#include <linux/fs.h>
#include <uapi/linux/mount.h>
#include <linux/types.h>
..

Go to the kmods directory (cd ~/parallels_fixed/kmods) and re-zip the files: tar -zcvf prl_mod.tar.gz . dkms.conf Makefile.kmods In case you missed it, yes that is a period(.) sitting there by itself and necessary.

Go to the installer directory cd ~/parallels_fixed/installer

Sudo chmod the script files: install-cli.sh (and others) to be executable eg. sudo chmod 777 *.sh

( @7feilee reports that if drag and drop is not working, then also try sudo chmod 777 prl* as the next step after chmod'ing the above script files ).

Then run that file with: sudo ./install-cli.sh -i --verbose

Reboot when it's finished.

Additionally, I had to modify the following files:

./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile:20

DRIVER_DIR ?= $(shell pwd)

./kmods/prl_tg/Toolgate/Guest/Linux/prl_tg/Makefile.v26:18

$(MAKE) -C $(SRC) M=$(shell pwd) SUBDIRS=$(shell pwd) SRCROOT=$(shell pwd) CC=$(CC) modules

NB: That is for Ubuntu 20.04 "kernel 5.4.0-21" and Parallels: 14.1.3 (45485).

然后就與之前ubuntu 18.04用起來完全沒差別了


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM