Just updated my Ubuntu kernel, and now VirtualBox no longer works. I ran
- sudo /etc/init.d/vboxdrv setup
And kept getting an error message that the Makefile was not working due to too many unresolved links.
After several hours of poking around and playing around I was able to get things working again. Hopefully this will benefit you as well.
Using the Synaptic Package Manager I downloaded
- linux-headers
- linux-image
- linux-restricted-modules
- linux-source
- linux-ubuntu-modules
- dkms
for the version of the Ubuntu 8.04 operating system I am using when I run “uname -r”. Mine happens to be 2.6.24-26-generic.
After you install all of these you may have to reboot. It should not hurt anything.
I did some digging around /lib/modules/2.6.24.26-generic/build and found two broken symbolic links for Makefile and Kbuild. These pointed back to the directory /usr/src/linux-headers-2.6.24-26-generic. Inside there is no Makefile nor Kbuild to point to.
After much consternation I did the following:
# cd /usr/src
# sudo tar xvjf linux-source-2.6.24
# sudo mv linux-headers-2.6.24-26-generic linux-headers-2.6.24-26-generic.orig
# sudo cp -r linux-source-2.6.24 linux-headers-2.6.24-26-generic
# sudo /etc/init.d/vboxdrv setup
This took a few minutes and I wept tears of joy when it completed without errors.
Now I lost VirtualBox icon from my Applications menu, but I can run it from the command line
# /usr/bin/VirtualBox &
Good luck