How do I install the virtualbox-dkms package?
I am getting the following error when attempting to install the VirtualBox kernel modules :
------------------------------
Deleting module version: 4.1.18
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-4.1.18 DKMS files...
Building only for 3.5.0-17-generic
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.I have tried installing the linux-source package, but I am not sure how Ubuntu handles kernel sources and headers.
Any ideas on how to do this from an Ubuntu standpoint?
7 Answers
My Virtual Box told me that the kernel drivers were not installed. I ran
sudo apt-get remove virtualbox-dkms to remove the drivers and then re-installed them
sudo apt-get install virtualbox-dkms which rebuilt the drivers and I was able to run virtualbox with no problems
1An other way:
apt-get install linux-headers-`uname -r`
dpkg-reconfigure virtualbox-dkmsThe normal way:
/etc/init.d/vboxdrv setup 4 You need the kernel header as well. Based on your output, sudo apt-get install kernel-headers-3.5.0-17-generic should do it. On the guest VM, either autorun the ISO image or sudo sh ./VBoxLinuxAdditions.run from the shell prompt should work. Appears this is a known problem with the latest 12.10 release.
This is caused by the kernel headers not being available. These headers are not typically required, but help other applications need them to build kernel modules to keep in sync with your distribution and the version you are using.
You can install specific headers, or you can install 'generic', or 'current':
sudo apt install linux-headers-genericThis will ensure that when you take in new kernels, the headers of those kernels are also installed. When you update your kernel, VirtualBox will be able to update itself with the newest, matching headers. Sometimes these can be found by other names, such as linux-headers-amd64, in other distributions.
After you have the headers, you can purge/re-install VirtualBox, or have VirtualBox rebuild the modules and complete the setup:
sudo dpkg-reconfigure virtualbox-dkms
sudo modprobe vboxdrv Didn't work for me. Solved it by running:
gksudo synapticSearch for 'dkms' and (re)install the one for VirtualBox and press the 'Apply' button. The output should say that virtualbox kernel drivers are up and running.
What worked for me: To run vboxconfig to rebuild virtualbox kernel drivers sudo /sbin/vboxconfig
Okay...so I had this problem. I tried an amazing array of different things to solve the problem. What worked for me was turning off Bios Security. The app was installed properly...There is probably a way to secure the BIOS and run VirtualBox...but I do not know how.