Unix & Linux Asked by Magick on February 24, 2021
Im trying to install and run minikube, and to do this I need to install virtualbox.
Im trying to install virtualbox on Ubuntu 18.04.
I already had virtualbox installed, but when I would try to run it, or minikube, I would get the following error:
WARNING: The character device /dev/vboxdrv does not exist. Please
install the virtualbox-dkms package and the appropriate headers,
most likely linux-headers-generic.
Steps taken to resolve this issue
sudo apt-get purge virtualbox
sudo apt-get install virtualbox
This resulted in:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
virtualbox-qt
Suggested packages:
vde2 virtualbox-guest-additions-iso
The following NEW packages will be installed:
virtualbox virtualbox-qt
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 25.7 MB of archives.
After this operation, 108 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ucmirror.canterbury.ac.nz/ubuntu bionic-updates/multiverse amd64 virtualbox amd64 5.2.10-dfsg-6ubuntu18.04.1 [17.1 MB]
Get:2 http://ucmirror.canterbury.ac.nz/ubuntu bionic-updates/multiverse amd64 virtualbox-qt amd64 5.2.10-dfsg-6ubuntu18.04.1 [8,580 kB]
Fetched 25.7 MB in 14s (1,820 kB/s)
Selecting previously unselected package virtualbox.
(Reading database ... 338152 files and directories currently installed.)
Preparing to unpack .../virtualbox_5.2.10-dfsg-6ubuntu18.04.1_amd64.deb ...
Unpacking virtualbox (5.2.10-dfsg-6ubuntu18.04.1) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_5.2.10-dfsg-6ubuntu18.04.1_amd64.deb ...
Unpacking virtualbox-qt (5.2.10-dfsg-6ubuntu18.04.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Setting up virtualbox (5.2.10-dfsg-6ubuntu18.04.1) ...
vboxweb.service is a disabled or a static unit, not starting it.
Job for virtualbox.service failed because the control process exited with error code.
See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; generated)
Active: failed (Result: exit-code) since Fri 2018-08-03 17:03:20 NZST; 14ms ago
Docs: man:systemd-sysv-generator(8)
Process: 30224 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
Aug 03 17:03:20 anton-ThinkPad-T510 systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Aug 03 17:03:20 anton-ThinkPad-T510 virtualbox[30224]: * Loading VirtualBox kernel modules...
Aug 03 17:03:20 anton-ThinkPad-T510 virtualbox[30224]: * No suitable module for running kernel found
Aug 03 17:03:20 anton-ThinkPad-T510 virtualbox[30224]: ...fail!
Aug 03 17:03:20 anton-ThinkPad-T510 systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Aug 03 17:03:20 anton-ThinkPad-T510 systemd[1]: virtualbox.service: Failed with result 'exit-code'.
Aug 03 17:03:20 anton-ThinkPad-T510 systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for shared-mime-info (1.9-2) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Setting up virtualbox-qt (5.2.10-dfsg-6ubuntu18.04.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
I have also checked that I have installed the required dependecies that are mentioned in the error:
sudo apt-get install virtualbox-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
virtualbox-dkms is already the newest version (5.2.10-dfsg-6ubuntu18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
sudo apt-get install linux-headers-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-generic is already the newest version (4.15.0.29.31).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Disable secure boot on the BIOS setting. That worked for me :)
Answered by Kidist on February 24, 2021
To run virtualbox, you need to load some modules into the kernel. Either you have binary modules matching your kernel, or you can compile them from source matching your kernel. It seems you don't have the modules, and compiling them either failed or was not attempted.
On my system, the drivers are compiles with
/usr/lib/virtualbox/vboxdrv.sh setup
Run that command manually and look for hints what might be wrong.
Answered by RalfFriedl on February 24, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP