2

I have just installed ubuntu on VirtualBox 6.1.16. I started trying to configure, and after running the following command: $ sudo apt install virtualbox-guest-dkms I receive the following error:

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)

Also, when trying to setup sublime text following the steps from the website, typing sudo apt-get install apt-transport-https gives the following:

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)

What could this be, and what should I do about it (if anything)?

fffrost
  • 125
  • It is a bug with 5.8 kernel and Virtualbox 6.1.10. See https://askubuntu.com/questions/1305873/error-installing-virtualbox-dkms-on-ubuntu-20 – Terrance Jan 07 '21 at 18:35
  • I am using Virtualbox Version 6.1.16, but it seems like the proposed solution was to install 6.1.16 (updated the question now). – fffrost Jan 07 '21 at 18:41
  • OK, I see. The virtualbox-guest-dkms is still only 6.1.10 which will not work with 5.8. Why are you trying to install the guest-dkms? – Terrance Jan 07 '21 at 18:46
  • I was following a tutorial to enable drag & drop features between guest & host. That isn't essential, but I also tried installing sublime text and received a similar error (updated the original post). – fffrost Jan 07 '21 at 18:52
  • Not all "tutorials" are good. – Pilot6 Jan 07 '21 at 18:54
  • @Pilot6 indeed, but it worked a few months ago with no issue, and I would not have figured it out myself as I am quite new to using Ubuntu. – fffrost Jan 07 '21 at 18:55
  • A few months ago there was the 5.4 kernel, that could work with old additions. But generally it is a wrong way to install them. – Pilot6 Jan 07 '21 at 18:56
  • Ok, well the features I was after are installed anyway. However I'm still receiving a similar message when attempting to install sublime text (see my edit). Again, it seems to still install sublime but I'm not sure if I need to do something about this error. Any ideas? – fffrost Jan 07 '21 at 18:58
  • You can ask another question about sublime. It is a different issue. – Pilot6 Jan 07 '21 at 19:06

5 Answers5

3

If you installed VirtualBox 6.1.16, you shouldn't install virtualbox-guest-dkms from Ubuntu repos.

You need to mount Guest Additions form the machine menu (Devices) and install the correspondent 6.1.16 Guest Additions.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
1

Simplest, This solved my issue. It's just that you installed a previous version of virtual-guest that is locked. You need to purge it to get it updated.

sudo apt-get remove --purge virtualbox-guest-dkms

sk33p34
  • 11
0

You need to boot with the latest working 5.4 kernel.

Then it will work.

Hopefully the 5.8 bug is fixed soon.

LarsAamo
  • 416
0

even after mounting Guest Additions form the machine menu (Devices) and install the correspondent 6.1.16 Guest Additions as @Pilot6 mentioned, whenever you try to update or install a software you'll probably see something like this

sudo apt install htop
[sudo] password for asarkar-vrt: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
htop is already the newest version (2.2.0-2build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
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] 
Setting up virtualbox-guest-dkms-hwe (6.1.16-dfsg-6ubuntu1.20.04.2) ...
Removing old virtualbox-guest-6.1.16 DKMS files...

Deleting module version: 6.1.16 completely from the DKMS tree.


Done. Loading new virtualbox-guest-6.1.16 DKMS files... Building for 5.11.0-7620-generic Building initial module for 5.11.0-7620-generic ERROR (dkms apport): kernel package linux-headers-5.11.0-7620-generic is not supported Error! Bad return status for module build on kernel: 5.11.0-7620-generic (x86_64) Consult /var/lib/dkms/virtualbox-guest/6.1.16/build/make.log for more information. dpkg: error processing package virtualbox-guest-dkms-hwe (--configure): installed virtualbox-guest-dkms-hwe package post-installation script subprocess returned error exit status 10 Errors were encountered while processing: virtualbox-guest-dkms-hwe E: Sub-process /usr/bin/dpkg returned an error code (1)

but if you just simply run this command the problem goes away.

sudo apt-get remove --purge virtualbox-guest-dkms-hwe

you can install anything after this but won't see that error anymore.

Arka
  • 101
0

I found that the most reliable solution is manually running the guest additions like with the following commands:

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
Lee
  • 1