我正在使用 VirtualBox 版本 6.1.16 和 Ubuntu 20.04.01。按照安装 sublime text 的步骤操作(这里),第二条命令(“确保 apt 已设置为使用 https 源”)我收到以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (2.0.2ubuntu0.2).
The following packages were automatically installed and are no longer required:
libfprint-2-tod1 libllvm10
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox-guest-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ...
Removing old virtualbox-guest-6.1.10 DKMS files...
------------------------------
Deleting module version: 6.1.10
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-guest-6.1.10 DKMS files...
Building for 5.8.0-34-generic
Building initial module for 5.8.0-34-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-guest-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64)
Consult /var/lib/dkms/virtualbox-guest/6.1.10/build/make.log for more information.
dpkg: error processing package virtualbox-guest-dkms (--configure):
installed virtualbox-guest-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
virtualbox-guest-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果我忽略错误,它确实可以安装,但我想确保我没有忽略任何东西。
答案1
跑步
sudo apt purge virtualbox-guest-dkms
然后转到虚拟机的设备菜单并从那里安装 Guest Additions。