Error installing virtualbox-dkms on Ubuntu 20 [duplicate]
By David Jones •
Ubuntu 20.04. I installed virtualbox using package; it worked, I created and ran a RM. But then stopped to work after software update. I cannot run the VMs, message says :
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly.
Please reinstall virtualbox-dkms package and load the kernel module by executing
'modprobe vboxdrv'
as root.I managed to disable secure boot, so this is not related to this.
Now I try to reinstall virtualbox-dkms package as requested :
sudo apt remove virtualbox-dkms
sudo apt install virtualbox-dkmsBut then I get the following error :
Préparation du dépaquetage de .../virtualbox-dkms_6.1.10-dfsg-1~ubuntu1.20.04.1_amd64.deb ...
Dépaquetage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ...
Paramétrage de virtualbox-dkms (6.1.10-dfsg-1~ubuntu1.20.04.1) ...
Loading new virtualbox-6.1.10 DKMS files...
Building for 5.8.0-34-generic
Building initial module for 5.8.0-34-generic
Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information.
dpkg: erreur de traitement du paquet virtualbox-dkms (--configure) : installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
Des erreurs ont été rencontrées pendant l'exécution : virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)If I look at /var/lib/dkms/virtualbox/6.1.10/build/make.log I see :
/var/lib/dkms/virtualbox/6.1.10/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.10/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.10/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.10/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:290 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [scripts/Makefile.build:519 : /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv] Erreur 2What I am missing ?
21 Answer
That is a bug with the 5.8 kernel and Virtualbox version 6.1.10
However, you can install Virtualbox version 6.1.16 from Virtualbox themselves that does work with kernel 5.8 and will stay updated.
From the instructions:
Add the Repo:
echo "deb [arch=amd64] $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.listInstall the key:
wget
sudo apt-key add oracle_vbox_2016.ascUpdate your repos:
sudo apt updateInstall Virtualbox 6.1
sudo apt install virtualbox-6.1Hope this helps!
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"