VirtualBox Guest Additions on OpenSuse 11.1
Saturday, September 5th, 2009I wrote about the difficulties of installing VirtualBox Guest Additions in a Centos 5.3 x64 virtual machine (and how to get around them) some time ago. Well, the same thing happens in openSuse 11.1 -and the workaround is subtly different, so it warrants its own post!
As with Centos, the fundamental problem is that fresh, default openSuse installation includes neither the kernel headers nor the compiler necessary for building the VirtualBox additions modules. If you just try to run the provided Additions script, therefore, you get this error:
Please install the build and header files for your current Linux kernel. The current kernel version is 2.6.27.7-9-default Please install the GNU compiler. Problems were found which would prevent the Guest Additions from installing. Please correct these problems and try again.
The fix is relatively simple, just as it is for Centos. Open a terminal and become root (su – root), then type in this command:
zypper in gcc kernel-source
The relevant software should be downloaded from the installation DVD and installed. In all about 65MB of software will be downloaded, occupying nearly 300MB of disk space after installation. Once that’s done, you can run the VirtualBox additions script once more …and this time, things will work just fine. (Incidentally, I initially tried installing only the kernel-headers, since they are much smaller… but they mysteriously got installed at version 2.26.27-2.28, which didn’t match the kernel version in use as reported by the initial VirtualBox error message, and which therefore didn’t satisfy the VirtualBox installer in the slightest. Sources it had to be!)
Whilst on the subject, it’s perhaps worth pointing out that Ubuntu 9.04 x64 doesn’t suffer from this problem at all: the VirtualBox additions install without a problem immediately after a default installation of that particular distro. I guess life would be a lot simpler, but also a lot more boring, if all distros behaved the same way in these sorts of respects!