PDA

View Full Version : How to install Virtual box?



deniska
2022-06-19, 22:07
Kali linux 2022.2 (fully updated).

The following error appears during installation:

sudo apt install virtualbox
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libavif13 libdav1d5 libdrm-intel1 libgeos3.10.2 libkf5kipi-data libkf5kipi32.0.0
Use 'sudo apt autoremove' to remove them.
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 0 not upgraded.
Need to get 42.9 MB of archives.
After this operation, 168 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirror-1.truenetwork.ru/kali kali-rolling/contrib amd64 virtualbox amd64 6.1.34-dfsg-2 [21.3 MB]
Get:2 http://mirror-1.truenetwork.ru/kali kali-rolling/contrib amd64 virtualbox-qt amd64 6.1.34-dfsg-2 [21.6 MB]
Fetched 42.9 MB in 1min 8s (628 kB/s)
Selecting previously unselected package virtualbox.
(Reading database ... 384210 files and directories currently installed.)
Preparing to unpack .../virtualbox_6.1.34-dfsg-2_amd64.deb ...
Unpacking virtualbox (6.1.34-dfsg-2) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_6.1.34-dfsg-2_amd64.deb ...
Unpacking virtualbox-qt (6.1.34-dfsg-2) ...
Setting up virtualbox (6.1.34-dfsg-2) ...
Job for virtualbox.service failed because the control process exited with error code.
See "systemctl status virtualbox.service" and "journalctl -xeu virtualbox.service" 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 Sun 2022-06-19 16:55:04 CDT; 21ms ago
Docs: man:systemd-sysv-generator(8)
Process: 88484 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
CPU: 48ms

Jun 19 16:55:04 pc systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Jun 19 16:55:04 pc virtualbox[88484]: Loading VirtualBox kernel modules...No suitable module for running kernel found ...
Jun 19 16:55:04 pc virtualbox[88494]: failed!
Jun 19 16:55:04 pc virtualbox[88495]: failed!
Jun 19 16:55:04 pc systemd[1]: virtualbox.service: Control process exited, code=exited, status=1/FAILURE
Jun 19 16:55:04 pc systemd[1]: virtualbox.service: Failed with result 'exit-code'.
Jun 19 16:55:04 pc systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Setting up virtualbox-qt (6.1.34-dfsg-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for kali-menu (2022.3.0) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for shared-mime-info (2.2-1) ...

In this case, the program is installed and it is possible to run it. But it does not create new virtual machines, appears next error:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

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.



How to fix?

Fred Sheehan
2022-06-29, 01:16
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.

sek_is_back
2022-07-03, 16:05
I face the same issue, before the upgrade everything works fine, No EFI Secure Boot enabled.

Fred Sheehan
2022-07-05, 13:30
Check your drivers are installed properly;

apt-get install linux-headers-`uname -r`
dpkg-reconfigure virtualbox-dkms

HB34
2023-01-18, 12:26
Check your drivers are installed properly;

apt-get install linux-headers-`uname -r`
dpkg-reconfigure virtualbox-dkms

When i try your first command i get this :


└─$ sudo apt-get install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-headers-6.0.0-kali3-amd64
E: Couldn't find any package by glob 'linux-headers-6.0.0-kali3-amd64'
E: Couldn't find any package by regex 'linux-headers-6.0.0-kali3-amd64'


uname -r returns "6.0.0-kali3-amd64", since there's no linux headers package for that i guess it's a problem, how could I solve it ?

dpkg-reconfigure gives me the same error message than the one during VBox installation, that OP showed in the first place, but it's probably related to that header problem

Fred Sheehan
2023-01-22, 14:07
Disable secure boot in the BIOS (sometimes called enable 'CSM or legacy' boot)

In kali terminal;
sudo apt install virtualbox virtualbox-qt virtualbox-dkms

sudo modprobe vboxdrv

this should sort it.. info from reading the error messages posted above, and what was installed..

hillashley
2023-01-22, 21:57
I face the same issue, before the upgrade everything works fine, No EFI Secure Boot enabled on contract fermentation (https://invivobio.net/contract-fermentation/).

I am sure your drivers are not installed as per requirements. Could you please share the screenshot or share the error here like deniska shared.