source: http://swaeku.github.io/blog/2013/03/09/installing-vagrant-on-ubuntu-12-dot-10/
Why Reproductibe Environments are Essentials
Without a reproductible environment that can be setup rapidly, testing installation or deployment scripts almost always ends up in breaking my working environment and makes me less efficient.
Virtualbox is the virtualization software used by Vagrant:
$ sudo apt-get install virtualbox
$ sudo apt-get install vagrant
Unless you've already installed you kernel headers, it shouldn't go without a hitch when executing the post-install scripts:
First Installation: checking all kernels...
Building only for 3.5.0-25-generic
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.
What happens here is that the virtualization technology used by VirtualBox needs specific kernel modules to be loaded, and these kernel modules are not built unless kernel headers are installed.
$ sudo apt-get install linux-headers-$(uname -r)
$ sudo dpkg-reconfigure virtualbox-dkms