Score:0

Virtualbox kernel driver problem on ubuntu 20.04 (updated from 16.04)

ml flag

i installed virtualbox (Version 6.1.22 r144080 (Qt5.12.8)) on ubuntu 20.04 focal. after installed virtual box i got this error on lunching VM's.

Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up
 correctly. Please try setting it up again by executing
 
 '/sbin/vboxconfig'
  as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

i'm using this code for fix the problem:

sudo /sbin/vboxconfig

and get this output:

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-generic linux-headers-4.4.0-104-generic
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-generic linux-headers-4.4.0-104-generic

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
`as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

i have two os. windows10 and ubuntu 20.04 with grub. i'm checking bios option and secure bot is disabled. also checking windows and no problem with boot option in windows. and not installed with UEFI style.

i'm trying to install

linux-headers-generic linux-headers-4.4.0-104-generic

but it got this error:

E: Package 'linux-headers-4.4.0-104-generic' has no installation candidate

how can i fix this problem?

output of uname -r

4.4.0-104-generic

output of dpkg -l | egrep linux-'[g|h|i|m]'

 ii  binutils-x86-64-linux-gnu                     2.34-6ubuntu1.1     
 amd64        GNU binary utilities, for x86-64-linux-gnu target ii 
 linux-generic                                 5.4.0.74.77             
 amd64        Complete Generic Linux kernel and headers ii 
 linux-headers-5.4.0-73                        5.4.0-73.82             
 all          Header files related to Linux kernel version 5.4.0 ii 
 linux-headers-5.4.0-73-generic                5.4.0-73.82             
 amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
 ii  linux-headers-5.4.0-74                        5.4.0-74.83         
 all          Header files related to Linux kernel version 5.4.0 ii 
 linux-headers-5.4.0-74-generic                5.4.0-74.83             
 amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
 ii  linux-headers-5.4.0-74-lowlatency             5.4.0-74.83         
 amd64        Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
 ii  linux-headers-generic                         5.4.0.74.77         
 amd64        Generic Linux kernel headers ii  linux-headers-lowlatency
 5.4.0.74.77                                                                 amd64        lowlatency Linux kernel headers rc 
 linux-image-4.15.0-143-generic                4.15.0-143.147          
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-101-generic                 4.4.0-101.124           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-103-generic                 4.4.0-103.126           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii
 linux-image-4.4.0-104-generic                 4.4.0-104.127           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-109-generic                 4.4.0-109.132           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-112-generic                 4.4.0-112.135           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-116-generic                 4.4.0-116.140           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-119-generic                 4.4.0-119.143           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-121-generic                 4.4.0-121.145           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-127-generic                 4.4.0-127.153           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-128-generic                 4.4.0-128.154           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-130-generic                 4.4.0-130.156           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-133-generic                 4.4.0-133.159           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-134-generic                 4.4.0-134.160           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-137-generic                 4.4.0-137.163           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-138-generic                 4.4.0-138.164           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-139-generic                 4.4.0-139.165           
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-157-generic                 4.4.0-157.185           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-169-generic                 4.4.0-169.198           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-174-generic                 4.4.0-174.204           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-176-generic                 4.4.0-176.206           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-179-generic                 4.4.0-179.209           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-21-generic                  4.4.0-21.37             
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-210-generic                 4.4.0-210.242           
 amd64        Signed kernel image generic rc 
 linux-image-4.4.0-97-generic                  4.4.0-97.120            
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP rc
 linux-image-4.4.0-98-generic                  4.4.0-98.121            
 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii
 linux-image-5.4.0-73-generic                  5.4.0-73.82             
 amd64        Signed kernel image generic ii 
 linux-image-5.4.0-74-generic                  5.4.0-74.83             
 amd64        Signed kernel image generic rc 
 linux-image-extra-4.4.0-101-generic           4.4.0-101.124           
 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-103-generic          
 4.4.0-103.126                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP ii  linux-image-extra-4.4.0-104-generic          
 4.4.0-104.127                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-109-generic          
 4.4.0-109.132                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-112-generic          
 4.4.0-112.135                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-116-generic          
 4.4.0-116.140                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-119-generic          
 4.4.0-119.143                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-121-generic          
 4.4.0-121.145                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-127-generic          
 4.4.0-127.153                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-128-generic          
 4.4.0-128.154                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-130-generic          
 4.4.0-130.156                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-133-generic          
 4.4.0-133.159                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-134-generic          
 4.4.0-134.160                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-137-generic          
 4.4.0-137.163                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-138-generic          
 4.4.0-138.164                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-139-generic          
 4.4.0-139.165                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-21-generic            4.4.0-21.37 
 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-97-generic            4.4.0-97.120
 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-image-extra-4.4.0-98-generic            4.4.0-98.121
 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP ii  linux-image-generic                           5.4.0.74.77 
 amd64        Generic Linux kernel image rc 
 linux-modules-4.15.0-143-generic              4.15.0-143.147          
 amd64        Linux kernel extra modules for version 4.15.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-157-generic              
 4.4.0-157.185                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-169-generic              
 4.4.0-169.198                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-174-generic              
 4.4.0-174.204                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-176-generic              
 4.4.0-176.206                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-179-generic              
 4.4.0-179.209                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-4.4.0-210-generic              
 4.4.0-210.242                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP ii  linux-modules-5.4.0-73-generic                5.4.0-73.82 
 amd64        Linux kernel extra modules for version 5.4.0 on 64 bit
 x86 SMP ii  linux-modules-5.4.0-74-generic                5.4.0-74.83 
 amd64        Linux kernel extra modules for version 5.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.15.0-143-generic       
 4.15.0-143.147                                                              amd64        Linux kernel extra modules for version 4.15.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-157-generic        
 4.4.0-157.185                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-169-generic        
 4.4.0-169.198                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-174-generic        
 4.4.0-174.204                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-176-generic        
 4.4.0-176.206                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-179-generic        
 4.4.0-179.209                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP rc  linux-modules-extra-4.4.0-210-generic        
 4.4.0-210.242                                                               amd64        Linux kernel extra modules for version 4.4.0 on 64 bit
 x86 SMP ii  linux-modules-extra-5.4.0-73-generic          5.4.0-73.82 
 amd64        Linux kernel extra modules for version 5.4.0 on 64 bit
 x86 SMP ii  linux-modules-extra-5.4.0-74-generic          5.4.0-74.83 
 amd64        Linux kernel extra modules for version 5.4.0 on 64 bit
 x86 SMP
nobody avatar
gh flag
Please show `dpkg -l | egrep linux-'[g|h|i|m]` also `uname -r`
ml flag
@nobody thanks, result of two command added to post. please help me to fix that.
ChanganAuto avatar
us flag
*If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them* -or- **just disable Secure Boot in UEFI**. And, of course, do NOT install older kernels.
ml flag
@ChanganAuto i checked the bios and other os on my laptop secure boot is disabled. can i double check EFI secure boot status in terminal?
ml flag
i run this command `test -d /sys/firmware/efi && echo efi || echo bios` the result is `bios` and `sudo mokutil --sb-state​` result is: `EFI variables are not supported on this system `
ChanganAuto avatar
us flag
OK, unless you have an ancient computer then there's no reason to use Legacy mode for any Windows 8 or newer and especially for dual-boot. That unfortunately reflects badly on you. That aside, why are you trying to install 4.4 kernel in Ubuntu 20.04? The error message is quite suspicious, it shouldn't be referencing obsolete kernel versions. Supposedly you only need to install `build-essential` and `linux-headers-generic`. Before that please cleanup the mess: `sudo apt update && sudo apt full-upgrade && sudo apt autoremove` to fully update the system and remove the obsolete kernels.
ml flag
@ChanganAuto Unfortunately my system is too old. i installing that kernel just because of virtualbox hint messages thats is totally wrong as you said. i run commands that you said to remove old kernel. hope is fix that problem. thanks again. can you add this comment as as answer to discus of that and if problem is solve mark that as answer. thanks again
ChanganAuto avatar
us flag
Does this answer your question? [VirtualBox installation message in Terminal: "this system is currently not set up to build kernel modules"](https://askubuntu.com/questions/1141874/virtualbox-installation-message-in-terminal-this-system-is-currently-not-set-u)
karel avatar
sa flag
Does this answer your question? [Virtualbox Kernel driver not installed](https://askubuntu.com/questions/41118/virtualbox-kernel-driver-not-installed)
Score:2
us flag

Make sure your system is fully updated and that old, obsolete, kernel aren't in the way:

sudo apt update && sudo apt full-upgrade && sudo apt autoremove

If no errors are reported then proceed to install what vboxconfig seems to be missing:

sudo apt install build-essential linux-kernel-headers

Finally, it should at this point be able to run the script correctly:

sudo /sbin/vboxconfig
ml flag
i running the full upgrade command and no error found. then i run install linux header and got this : `build-essential is already the newest version (12.8ubuntu1.1). linux-headers-generic is already the newest version (5.4.0.74.77).` after running `vboxconfig` command, again i got same error : `This system is currently not set up to build kernel modules.` `The distribution packages containing the headers are probably: linux-headers-generic linux-headers-4.4.0-104-generic` how i can install correct header for 20.04 ?
ChanganAuto avatar
us flag
Answer edited. You can just run `sudo apt install linux-kernel-headers`, the other packaged is already installed. Also check which kernel you're actually using - `uname -a`. If it's 4.x then something is wrong. Reboot to make sure you're booting with the newer kernel and run autoremove again.
ml flag
i'm installing all headers, and reset the system output of `uname -a` is `Linux ProBook 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux` i have ubuntu 20.04 that updated from 18.04 then updated from 16.04
ChanganAuto avatar
us flag
That explains why you're still running with the first 16.04 kernel. You need to use the second option in Grub menu and explicitly select the newest kernel.
ml flag
can explain more detail ? what is second option in grub?
ChanganAuto avatar
us flag
The advanced options...
ml flag
its fixed thanks again :)
user109764 avatar
cn flag
Helped also in Sparky Linux on Debian 8.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.