Eu estava tentando instalar uma versão antiga do virtualbox (4.3.0) porque vou trabalhar em um projeto que o use.
Depois de instalar o VirtualBox, recebi este erro quando escrevo virtualbox --version
:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.8.0-36-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "S&tart" under id 16
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "&Pause" under id 17
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "&Reset" under id 18
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "D&iscard saved state..." under id 24
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Re&fresh..." under id 25
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Show in File Manager" under id 27
Qt WARNING: void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Create Shortcut on Desktop" under id 28
Se eu executar este código como o aviso diz:
sudo /etc/init.d/vboxdrv setup
recebi outro erro:
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-4.3.0.crash'
Error! Bad return status for module build on kernel: 4.8.0-36-generic (x86_64)
Consult /var/lib/dkms/vboxhost/4.3.40/build/make.log for more information.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
Eu tentei resolver meu problema com essas outras perguntas do askubuntu sem sucesso:
Como corrijo uma falha de configuração do vboxdrv em VirtualBox?
Erro do Virtualbox após instalar o novo kernel Linux 4.4
O driver do Kernel do Virtualbox não está instalado
Eu preciso dessa versão do VB porque estou usando o vagrant 1.7.2, e quando eu executo vagrant up
eu tenho isso:
VirtualBox is complaining that the kernel module is not loaded. Please
run 'VBoxManage --version' or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
então, não consigo subir a virtualbox no ubuntu 16.
Editar: adicionei o log de /var/lib/dkms/vboxhost/4.3.40/build/make.log
:
DKMS make.log for vboxhost-4.3.40 for kernel 4.8.0-36-generic (x86_64)
dom mar 5 09:44:42 VET 2017
make: Entering directory '/usr/src/linux-headers-4.8.0-36-generic'
LD /var/lib/dkms/vboxhost/4.3.40/build/built-in.o
LD /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/linux/SUPDrv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/SUPDrv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/SUPDrvSem.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/SUPDrvTracer.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/alloc-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/initterm-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/memobj-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/mpnotification-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/powernotification-r0drv.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/memuserkernel-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/mp-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/mpnotification-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/process-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/semevent-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/semeventmulti-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/semfastmutex-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/semmutex-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/spinlock-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/thread-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/thread2-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/threadctxhooks-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/time-r0drv-linux.o
CC [M] /var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/timer-r0drv-linux.o
/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/timer-r0drv-linux.c: In function ‘rtTimerLnxStartSubTimer’:
/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/timer-r0drv-linux.c:364:13: error: implicit declaration of function ‘mod_timer_pinned’ [-Werror=implicit-function-declaration]
mod_timer_pinned(&pSubTimer->u.Std.LnxTimer, pSubTimer->u.Std.ulNextJiffies);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:289: recipe for target '/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/timer-r0drv-linux.o' failed
make[2]: *** [/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv/r0drv/linux/timer-r0drv-linux.o] Error 1
scripts/Makefile.build:440: recipe for target '/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv' failed
make[1]: *** [/var/lib/dkms/vboxhost/4.3.40/build/vboxdrv] Error 2
Makefile:1491: recipe for target '_module_/var/lib/dkms/vboxhost/4.3.40/build' failed
make: *** [_module_/var/lib/dkms/vboxhost/4.3.40/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.8.0-36-generic'