2

I need to run Vagrant for my projects, when I try to up it:

user@chrubuntu:/var/www/***$ vagrant up
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.

VBoxManage --version

user@chrubuntu:/var/www/***$ VBoxManage --version
WARNING: The character device /dev/vboxdrv does not exist.
     Please install the virtualbox-dkms package and the appropriate
     headers, most likely linux-headers-3.8.11.

     You will not be able to start VMs until this problem is fixed.
4.2.16_Ubuntur86992

I had try to setup vboxdrv by:

/etc/init.d/vboxdrv setup
    * Starting VirtualBox kernel modules                                            
    * No suitable module for running kernel found           [fail]

dpkg-reconfigure virtualbox

user@chrubuntu:/var/www/***$ sudo dpkg-reconfigure virtualbox
+ sudo dpkg-reconfigure virtualbox
[sudo] password for user: 
 * Stopping VirtualBox kernel modules  [ OK ] 
 * Starting VirtualBox kernel modules
 * No suitable module for running kernel found          [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.

dpkg-reconfigure virtualbox-dkms

user@chrubuntu:/var/www/***$ sudo dpkg-reconfigure virtualbox-dkms
+ sudo dpkg-reconfigure virtualbox-dkms

------------------------------
Deleting module version: 4.2.16
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-4.2.16 DKMS files...
dpkg: warning: version '*-*' has bad syntax: version number does not start with digit
It is likely that 3.8.11 belongs to a chroot's host
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
 * Stopping VirtualBox kernel modules                  [ OK ] 
 * Starting VirtualBox kernel modules 
 * No suitable module for running kernel found               [fail]
invoke-rc.d: initscript virtualbox, action "restart" failed.

uname -a

Linux chrubuntu 3.8.11 #1 SMP Wed May 14 04:04:45 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux

When I try to install linux headers:

user@chrubuntu:/var/www/rs-chef$ sudo apt-get install linux-headers-$(uname -r)
++ uname -r
+ sudo apt-get install linux-headers-3.8.11
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-3.8.11
E: Couldn't find any package by regex 'linux-headers-3.8.11'
Robert
  • 10,403
  • 14
  • 67
  • 117
hmelenok
  • 33
  • 7
  • 3
    This may help: https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-%28x86%29 – Canuk Jul 12 '14 at 12:37
  • Thanks! https://github.com/dnschneid/crouton/wiki/Build-kernel-headers-and-install-Virtualbox-%28x86%29 - is perfect answer – hmelenok Feb 10 '15 at 12:43

1 Answers1

0

Try installing the following missing packages:

sudo apt-get install dkms linux-headers-generic virtualbox-ose-source

Also try:

sudo /etc/init.d/vboxdrv setup

For more details, check: Build kernel headers and install Virtualbox (x86) page.

kenorb
  • 155,785
  • 88
  • 678
  • 743