I update my kernel from 4.15 to 4.18.5 and then after my VirtualBox shows folowning errors Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root.

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

I tried

sudo apt-get remove virtualbox-dkms
sudo apt-get remove --purge virtualbox-dkms
sudo apt-get install -y linux-headers-amd64 linux-image-amd64
sudo apt-get install -y virtualbox-dkms

commands but in the Terminal following errors appers ->

sudo apt-get install -y virtualbox-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/657 kB of archives.
After this operation, 5,408 kB of additional disk space will be used.
Selecting previously unselected package virtualbox-dkms.
(Reading database ... 284020 files and directories currently installed.)
Preparing to unpack .../virtualbox-dkms_5.2.10-dfsg-6ubuntu18.04.1_all.deb ...
Unpacking virtualbox-dkms (5.2.10-dfsg-6ubuntu18.04.1) ...
Setting up virtualbox-dkms (5.2.10-dfsg-6ubuntu18.04.1) ...
Loading new virtualbox-5.2.10 DKMS files...
Building for 4.18.5-041805-generic
Building initial module for 4.18.5-041805-generic
ERROR (dkms apport): kernel package linux-headers-4.18.5-041805-generic is not supported
Error! Bad return status for module build on kernel: 4.18.5-041805-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.2.10/build/make.log for more information.

Please HELP me

After viewing the make.log file, I found out this, errors are all in capital enter(it's quite large, but please look into it )

CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/SUPR0IdcClientComponent.o CC [M] /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/SUPR0IdcClient-linux.o /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c: In function ‘vboxPciLinuxDevDetachHostDriver’: /var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.c:92:40: ERROR: IMPLICIT DECLARATION OF FUNCTION ‘PCI_GET_BUS_AND_SLOT’; DID YOU MEAN ‘PCI_GET_DOMAIN_BUS_AND_SLOT’? [-WERROR=IMPLICIT-FUNCTION-DECLARATION] # DEFINE PCI_DEV_GET_SLOT(BUS, DEVFN) PCI_GET_BUS_AND_SLOT(BUS, DEVFN) ^ /VAR/LIB/DKMS/VIRTUALBOX/5.2.10/BUILD/VBOXPCI/LINUX/VBOXPCI-LINUX.C:397:15: NOTE: IN EXPANSION OF MACRO ‘PCI_DEV_GET_SLOT’ PPCIDEV = PCI_DEV_GET_SLOT(UBUS, UDEVFN); ^~~~~~~~~~~~~~~~ /VAR/LIB/DKMS/VIRTUALBOX/5.2.10/BUILD/VBOXPCI/LINUX/VBOXPCI-LINUX.C:397:13: WARNING: ASSIGNMENT MAKES POINTER FROM INTEGER WITHOUT A CAST [-WINT-CONVERSION] PPCIDEV = PCI_DEV_GET_SLOT(UBUS, UDEVFN); ^ /VAR/LIB/DKMS/VIRTUALBOX/5.2.10/BUILD/VBOXPCI/LINUX/VBOXPCI-LINUX.C: IN FUNCTION ‘VBOXPCIOSDEVINIT’: /VAR/LIB/DKMS/VIRTUALBOX/5.2.10/BUILD/VBOXPCI/LINUX/VBOXPCI-LINUX.C:648:17: WARNING: ASSIGNMENT MAKES POINTER FROM INTEGER WITHOUT A CAST [-WINT-CONVERSION] PPCIDEV = PCI_DEV_GET_SLOT((PINS->HOSTPCIADDRESS) >> 8, ^ CC1: SOME WARNINGS BEING TREATED AS ERRORS scripts/Makefile.build:317: recipe for target '/var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.o' failed make[2]: * [/var/lib/dkms/virtualbox/5.2.10/build/vboxpci/linux/VBoxPci-linux.o] Error 1 scripts/Makefile.build:558: recipe for target '/var/lib/dkms/virtualbox/5.2.10/build/vboxpci' failed make1: * [/var/lib/dkms/virtualbox/5.2.10/build/vboxpci] Error 2 Makefile:1500: recipe for target 'module/var/lib/dkms/virtualbox/5.2.10/build' failed make: *** [module/var/lib/dkms/virtualbox/5.2.10/build] Error 2 make: Leaving directory '/usr/src/linux-headers-4.18.5-041805-generic'

I don't know kernel programming, what can I make out of this?

  • Check what is on the log but what part of not supported is unclear?
    – Panther
    Sep 10 '18 at 15:13
  • Sir, I'm not getting your comment Sep 10 '18 at 17:28
  • 1
    "kernel package linux-headers-4.18.5-041805-generic is not supported " means virtual box does not support this kernel. This means that unless you are willing to modify either the kernel or source code yourself it will not work. You can start by looking at the logs. "Consult /var/lib/dkms/virtualbox/5.2.10/build/make.log for more information."
    – Panther
    Sep 10 '18 at 19:01
  • @Panther Sir, the Comments section space was not sufficient, so I posted my next step in the Question section. Sep 11 '18 at 13:48
  • Are you even using Ubuntu? Ubuntu does not have kernel version 4.18.5 anywhere in the repositories.
    – Thomas Ward
    Sep 12 '18 at 13:53

The gist of the messages you're getting is that the kernel version you're using, 4.18.5, is not supported by the version of the VirtualBox tools you're trying to utilize.

To that end, you should go back to the supported kernel in order to use the VBox tools, which is likely the 4.15 that you had before. (Not sure where you got 4.18.5 from, either...)

The other option is to not use VBox Tools and go without them, but that is likely to have its own headaches involved.

  • Thank you, Sir It is working. How can I remove kernel -4.18.5-041805 generic from "advanced option for Ubuntu".@Thomas Ward Sep 12 '18 at 7:55
  • How did you install 4.18.5 to begin with? If we knew how you installed the newer kernel we might be able to assist with its removal. (That is, however, its own separate question)
    – Thomas Ward
    Sep 12 '18 at 11:48
  • 'uname -r' "Current kernel version" 'lsb_release -a' 'sudo add-apt-repository ppa:teejee2008/ppa' 'sudo apt-get install ukuu' 'ukuu --list' "It shows all the available kernels" 'xhost +' 'sudo ukuu --install v4.18.5' And then, The kernel v4.18.5 is installed @Thomas Ward Sep 12 '18 at 13:50
  • @KumarAkshayGuptaGupta that wasn't my question - how did you install 4.18.5? Which Ubuntu are you on? Are you on 18.10 (which is the only Ubuntu release which has 4.18.x), or did you manually install kernel version 4.18.5? Or are you not using Ubuntu?
    – Thomas Ward
    Sep 12 '18 at 13:53
  • I am using ubuntu 18.04LTS Sep 12 '18 at 13:57

You can also install the latest snapshot build, which works tested with 4.18.13!

https://www.virtualbox.org/ticket/17981 is currently tracking this issue.

You can get the development snapshot at https://www.virtualbox.org/wiki/Testbuilds

At the time of writing, 5.2.97 was the latest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.