5

I have tried to install Virtualbox on Arch(4.7.0-1) using pacman and everything seems to go fine until I try to run it. I get the following message

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.7.0-1-ARCH) or it failed to load. Please recompile the kernel module and install it by

       sudo /sbin/vboxconfig

     You will not be able to start VMs until this problem is fixed.

VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: /usr/lib/libQt5Core.so.5: file too short

Any thoughts on where I should start looking to debug this?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Ian Powell
  • 131
  • 2
  • 6

3 Answers3

5

Since version 5.0.16, virtualbox-host-modules-arch and virtualbox-host-dkms use systemd-modules-load.service to load all four VirtualBox modules at boot time.

To load the module manually, run: modprobe vboxdrv

https://wiki.archlinux.org/index.php/VirtualBox#Load_the_VirtualBox_kernel_modules

tommybananas
  • 5,718
  • 1
  • 28
  • 48
1

This answer was tested only in Ubuntu and Debian 9 in my case, but maybe can works for you.

I think the problem is that the vboxdrv module is not signed and therefore not loaded with the kernel. This will happen if your computer has the SecureBoot mode activated, something very common in modern equipment.

That's why I get this error opening any machine in the Virtual Box

Kernel driver not installed (rc=-1908)

Do the following steps to sign a driver, and it is loaded as a kernel module:

1. Install the mkutil package to be able to do signed.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mokutil

2. generate the signature file:

openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"

3. Then add it to the kernel:

sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)

4. Register it for the Secure Boot.

IMPORTANT! That will ask you for a password, put the one you want, you will only have to use it once in the next reboot.

sudo mokutil --import MOK.der

5. Finally, restart the computer. A blue screen will appear with a keyboard wait, press the key that asks you to interrupt the boot.

enter image description here

When you are inside the blue screen, select

Enroll MOK > Continue > Yes > and it will ask you for the password

that you have previously entered, you will enter it and you will be informed that the operation has been completed successfully.

Now your operating system will start and you can now use VirtualBox without problem :)

Hope this help someone.

-1

Open Terminal - Verify version / codename

Code:

lsb_release -a

Using whatever plain text editors like gedit/scite/bash

Code:

sudo gedit /etc/apt/sources.list

Add the following line to your /etc/apt/sources.list:

Code:

deb http://download.virtualbox.org/virtualbox/debian xenial contrib

Save and Close

Add Key, and combine with Downloading and Registering;

Code:

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Make sure DKMS is installed. May need to re-install to current kernal.

Code:

dkms status

You might encounter an error at this point complaining about linux-headers, simply download the header package by apt-get install linux-headers-5.4.0-28-generic

Make sure Computer and OS is upto date

Code:

sudo apt-get autoclean sudo apt-get clean sudo apt-get autoremove sudo apt-get update sudo apt-get upgrade

Rebuild all DKMS modules for the currently running kernel:

Code:

dkms autoinstall

Install Latest Version of VirtualBox

Code:

sudo apt-get install virtualbox