我刚刚在 VirtualBox 6.1.16 上安装了 ubuntu。我开始尝试配置,运行以下命令后:$ sudo apt install virtualbox-guest-dkms
我收到以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-guest-dkms is already the newest version (6.1.10-dfsg-1~ubuntu1.20.04.1).
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'rogress: [ 33%] [#######################.................................................]
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 ex
it status 10
Errors were encountered while processing:
virtualbox-guest-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
另外,当尝试按照网站上的步骤设置 sublime text 时,输入sudo apt-get install apt-transport-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
如果您安装了 VirtualBox 6.1.16,则不应从virtualbox-guest-dkms
Ubuntu 存储库安装。
您需要从机器菜单(设备)挂载 Guest Additions,并安装相应的 6.1.16 Guest Additions。
答案2
最简单的,这解决了我的问题。只是你安装了以前版本的虚拟客户机,该版本已被锁定。你需要清除它才能更新它。
sudo apt-get 删除 --purge virtualbox-guest-dkms
答案3
您需要使用最新的 5.4 内核进行启动。
然后它就会起作用。
希望 5.8 的错误能尽快修复。
答案4
我发现最可靠的解决方案是手动运行客户添加功能,例如使用以下命令:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
sudo ./VBoxLinuxAdditions.run