Virtualbox package fails to install -broken?

Asked by tomdean

I had virtualbox running OK. An upgrade broke it. Looks like kernel package linux-headers-5.8.0-55-generic is not supported.
How do I fix this?

> uname -a
Linux meerkat 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -dr
Description: Ubuntu 20.04.2 LTS
Release: 20.04

> sudo apt install virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  kbuild module-assistant
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  virtualbox-dkms virtualbox-qt
Suggested packages:
  vde2 virtualbox-guest-additions-iso
The following NEW packages will be installed:
  virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/43.7 MB of archives.
After this operation, 177 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package virtualbox-dkms.
(Reading database ... 285137 files and directories currently installed.)
Preparing to unpack .../virtualbox-dkms_6.1.6-dfsg-1_amd64.deb ...
Unpacking virtualbox-dkms (6.1.6-dfsg-1) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../virtualbox_6.1.6-dfsg-1_amd64.deb ...
Unpacking virtualbox (6.1.6-dfsg-1) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_6.1.6-dfsg-1_amd64.deb ...
Unpacking virtualbox-qt (6.1.6-dfsg-1) ...
Setting up virtualbox-dkms (6.1.6-dfsg-1) ...
Loading new virtualbox-6.1.6 DKMS files...
Building for 5.8.0-55-generic
Building initial module for 5.8.0-55-generic
ERROR (dkms apport): kernel package linux-headers-5.8.0-55-generic is not supported
Error! Bad return status for module build on kernel: 5.8.0-55-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.6/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of virtualbox:
 virtualbox depends on virtualbox-dkms (>= 6.1.6-dfsg-1) | virtualbox-source (>= 6.1.6-dfsg-1) | virtualbox-modules; however:
  Package virtualbox-dkms is not configured yet.
  Package virtualbox-source is not installed.
  Package virtualbox-modules is not installed.
  Package virtualbox-dkms which provides virtualbox-modules is not configured yet.

dpkg: error processing package virtualbox (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the er
ror message indicates its a followup error from a previous failure.
                                                                   dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 6.1.6-dfsg-1); however:
  Package virtualbox is not configured yet.

dpkg: error processing package virtualbox-qt (--configure):
 dependency problems - leaving unconfigured
Processing triggers for menu (2.1.47ubuntu4) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for shared-mime-info (1.15-1) ...
Errors were encountered while processing:
 virtualbox-dkms
 virtualbox
 virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)

> cat /var/lib/dkms/virtualbox/6.1.6/build/make.log
DKMS make.log for virtualbox-6.1.6 for kernel 5.8.0-55-generic (x86_64)
Sat Jun 19 17:59:16 PDT 2021
make: Entering directory '/usr/src/linux-headers-5.8.0-55-generic'
  CC [M] /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M] /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrv.o
  CC [M] /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrvGip.o
  CC [M] /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrvSem.o
  CC [M] /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrvTracer.o
In file included from ./include/asm-generic/percpu.h:7,
                 from ./arch/x86/include/asm/percpu.h:556,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/../SUPD
rvInternal.h:79,
                 from /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-
linux.c:32:
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.c: In function ‘s
updrvOSChangeCR4’:
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.c:760:38: error:
 ‘cpu_tlbstate’ undeclared (first use in this function); did you mean ‘cpuhp_state’?
  760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
      | ^~~~~~~~~~~~
./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’
  318 | typeof(variable) pscr_ret__; \
      | ^~~~~~~~
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’
  760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
      | ^~~~~~~~~~~~~
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.c:760:38: note: each undeclared identifier is reported only once for
 each function it appears in
  760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
      | ^~~~~~~~~~~~
./include/linux/percpu-defs.h:318:9: note: in definition of macro ‘__pcpu_size_call_return’
  318 | typeof(variable) pscr_ret__; \
      | ^~~~~~~~
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro ‘this_cpu_read’
  760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
      | ^~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:286: /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrvTracer.o: warning: objtool: .text+0x7: indirect jump found in RETPOLINE build
/var/lib/dkms/virtualbox/6.1.6/build/vboxdrv/SUPDrvTracer.o: warning: objtool: supdrvTracerProbeFireStub() is missing an ELF size an
notation
make[1]: *** [scripts/Makefile.build:515: /var/lib/dkms/virtualbox/6.1.6/build/vboxdrv] Error 2
make: *** [Makefile:1785: /var/lib/dkms/virtualbox/6.1.6/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.8.0-55-generic'

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu virtualbox Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

apt-cache policy virtualbox

Thanks

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#2

Try upgrading to virtualbox version 6.1.16-dfsg-6~ubuntu1.20.04.2 (in focal-updates and focal-security)

Revision history for this message
tomdean (tomdean) said :
#3

On 6/20/21 6:05 AM, Manfred Hampl wrote:
> Your question #697628 on virtualbox in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/virtualbox/+question/697628
>
> Status: Needs information => Answered
>
> Manfred Hampl proposed the following answer:
> Try upgrading to virtualbox version 6.1.16-dfsg-6~ubuntu1.20.04.2 (in
> focal-updates and focal-security)
>

That worked. Thanks.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Is there still something open with this question?

if not, then please mark it as solved.

Revision history for this message
tomdean (tomdean) said :
#5

Thanks Manfred Hampl, that solved my question.