CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrv.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvGip.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvSem.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvTracer.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPLibAll.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/alloc-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/initterm-r0drv.o
CC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/memobj-r0drv.o
CC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/mpnotification-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/powernotification-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/linux/assert-r0drv-linux.oIn 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.10/build/vboxdrv/linux/../SUPDrvInternal.h:79,from /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:32:/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c: Infunction ‘supdrvOSChangeCR4’:/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 youmean ‘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 | RTCCUINTREGuOld = 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 eachfunction 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 | RTCCUINTREGuOld = 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]Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: ***[scripts/Makefile.build:519:/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv] Error 2 make: ***[Makefile:1780: /var/lib/dkms/virtualbox/6.1.10/build] Error 2 make:Leaving directory '/usr/src/linux-headers-5.8.0-36-generic'
Had the same issue But finally got it fixed!!!
By removing Virtualbox completely and reinstalling it.
Tried downgarding the kernel but that did'nt work for me
sudo apt-get purge "^virtualbox-.*"sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean
Then download the latest virtualbox version from this link for ubuntu 20.04
https://www.virtualbox.org/wiki/Linux_Downloads
I tried many other solutions, none worked for me.
Try to install virtualbox from its download page to make sure that it's the latest version of virtualbox (6.1.16).
If it's still failing, maybe this answer can help
Removing kernel versions like 5.8 and downgrading to 5.4.0-60-generic has solved the problem. After booting with kernel 5.4.0-60-generic I was able to install Virtualbox using synaptic and my new virtual machine works.
Yes, removing or downgrade your kernel and solved problem. You could use mainline and grub-cusomizer.
grub-cusomizer:https://tipsonubuntu.com/2018/03/11/install-grub-customizer-ubuntu-18-04-lts/
mainline: https://ubuntuhandbook.org/index.php/2020/08/mainline-install-latest-kernel-ubuntu-linux-mint/
Had a similar issue.Steps that I followed:
sudo apt-get purge "^virtualbox-.*"
sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean
wget https://download.virtualbox.org/virtualbox/7.0.6/VirtualBox-7.0.6-155176-Linux_amd64.run
chmod +x ./VirtualBox-7.0.6-155176-Linux_amd64.run
sudo ./VirtualBox-7.0.6-155176-Linux_amd64.run
Note: You may need to change the version number for what
the easiest solution is to install libgsoap manually and then try installing VirtualBox, I did the same it worked for me
https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/libgsoap-2.8.91_2.8.91-2_amd64.deb.html
above is the link to install
It's not recommended to install any software from Terminal because you always will get the old version of that software .Hence,its always better to install and download software from their particular's official website ..
In ur case,its better to exit the Terminal and try to install virtualbox from their respective official website:
https://www.virtualbox.org/wiki/Linux_Downloads
If this also don't work then try to remove all the virtualbox dependencies from Synaptic Package Manager and againinstall virtualbox ..