Estou tentando instalar e rodar o minikube, e para isso eu preciso instalar o virtualbox.
Estou tentando instalar o virtualbox no Ubuntu 18.04.
Eu já tinha o VirtualBox instalado, mas quando eu tentava executá-lo, ou o minikube, eu recebia o seguinte erro:
WARNING: The character device /dev/vboxdrv does not exist. Please
install the virtualbox-dkms package and the appropriate headers,
most likely linux-headers-generic.
Etapas tomadas para resolver este problema
sudo apt-get purge virtualbox
sudo apt-get install virtualbox
Isso resultou em:
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) ...
Também verifiquei que instalei as dependências necessárias mencionadas no erro:
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.