Tuesday, 21 February 2012

minimal server with VirtualBox: remember to install linux-headers

I have a minimal ubuntu linux server inside a windows machine, created with VirtualBox. But I was unable to install the GuestAditions

The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason

As I did not know exactly the name of the packages to install, I did some googling looking if more people have had the same problem, and i found that a quick solution is to select the intallation of the generic vbox guest additions in your package manager and see which dependencies you need to install.


$ sudo aptitude install virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-guest-utils virtualbox-ose-guest-x11

The following NEW packages will be installed:
  dkms{a} linux-headers-2.6.32-38{a} linux-headers-2.6.32-38-generic{a} linux-headers-generic{a} 
  virtualbox-ose-dkms virtualbox-ose-guest-dkms virtualbox-ose-guest-utils virtualbox-ose-guest-x11 
--cancel

$ sudo aptitude install dkms{a} linux-headers-2.6.32-38{a} linux-headers-2.6.32-38-generic{a} linux-headers-generic{a}

# now go to the GuestAdditions CD and 
ubuntu:/media/VBOXADDITIONS_4.1.8_75467$ sudo bash VBoxLinuxAdditions.run 

No comments: