Pour installer VirtualBox (comme cela est décrit ici ) sur ma machine Ubuntu 18.04, j'exécute les commandes suivantes
echo "deb [Arch=AMD64] http://download.virtualbox.org/virtualbox/debian bionic contrib" | Sudo tee /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/Oracle_vbox_2016.asc -O- | Sudo apt-key add -
Sudo apt-get update
Tous courent bien. Mais pour
Sudo apt-get install virtualbox-5.2
J'ai eu l'erreur:
The following packages have unmet dependencies:
virtualbox-5.2 : Depends: libqt5opengl5 (>= 5.0.2) but it is not installable
Depends: libqt5printsupport5 (>= 5.0.2) but it is not installable
Depends: libqt5x11extras5 (>= 5.6.0) but it is not installable
Depends: libsdl1.2debian (>= 1.2.11) but it is not installable
Recommends: libsdl-ttf2.0-0 but it is not installable
E: Unable to correct problems, you have held broken packages.
Lorsque j'utilise le référentiel Ubuntu par défaut, l'installation renvoie l'erreur qui est décrite exactement ici .
Après l'installation, je ne peux plus démarrer VM (par exemple NAME
) et j'ai l'erreur
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-generic.
You will not be able to start VMs until this problem is fixed.
Waiting for VM "NAME" to power on...
VBoxManage: error: The virtual machine 'NAME' has terminated unexpectedly during startup with exit code 1 (0x1)
Bien entendu, le package virtualbox-dkms
est installé.
Le nom du modèle (cat /proc/cpuinfo | grep "model name" | uniq
) est Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz
et grep -E "svm|vmx" /proc/cpuinfo | wc -l
renvoie 4.
Comme suggéré par Melebius , voici la sortie complète après avoir exécuté Sudo dpkg-reconfigure virtualbox-dkms
:
-------- Uninstall Beginning --------
Module: virtualbox
Version: 5.2.10
Kernel: 4.15.0-30-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-30-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-30-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-30-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-30-generic/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
DKMS: uninstall completed.
-------- Uninstall Beginning --------
Module: virtualbox
Version: 5.2.10
Kernel: 4.15.0-33-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-33-generic/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-33-generic/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-33-generic/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/4.15.0-33-generic/
rmdir: failed to remove '': No such file or directory
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 5.2.10
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-5.2.10 DKMS files...
Building for 4.15.0-30-generic 4.15.0-33-generic
Building initial module for 4.15.0-30-generic
Done.
vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-30-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-30-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-30-generic/updates/dkms/
vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-30-generic/updates/dkms/
depmod...
DKMS: install completed.
Building initial module for 4.15.0-33-generic
Done.
vboxdrv:
Running module version sanity check.
modinfo: ERROR: could not get modinfo from 'vboxdrv': Invalid argument
- Original module
- Installation
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
modinfo: ERROR: could not get modinfo from 'vboxnetadp': Invalid argument
- Original module
- Installation
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
modinfo: ERROR: could not get modinfo from 'vboxnetflt': Invalid argument
- Original module
- Installation
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/
vboxpci.ko:
Running module version sanity check.
modinfo: ERROR: could not get modinfo from 'vboxpci': Invalid argument
- Original module
- Installation
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/
depmod...
DKMS: install completed.
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 Mon 2018-08-27 15:38:36 UTC; 5ms ago
Docs: man:systemd-sysv-generator(8)
Process: 9229 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
Aug 27 15:38:36 cmsuite-build-machine systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Aug 27 15:38:36 cmsuite-build-machine virtualbox[9229]: * Loading VirtualBox kernel modules...
Aug 27 15:38:36 cmsuite-build-machine virtualbox[9229]: * modprobe vboxdrv failed. Please use 'dmesg' to find out why
Aug 27 15:38:36 cmsuite-build-machine virtualbox[9229]: ...fail!
Aug 27 15:38:36 cmsuite-build-machine systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Aug 27 15:38:36 cmsuite-build-machine systemd[1]: virtualbox.service: Failed with result 'exit-code'.
Aug 27 15:38:36 cmsuite-build-machine systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Qu'est-ce que je fais mal?
Je faisais face au même problème. Je vous suggère de désactiver TPM et SecureBoot dans vos paramètres UEFI.