I’m trying to install the Virtual Box Guest Addition for my openSUSE 11.3 VM, but I’m having some problems.
The Virtual Box manual says I need to install the kernel-default-devel package, so I did that, but it also says :
Make sure that your running kernel (uname -a) and the kernel packages you have installed (rpm -qa kernel*) have the exact same version number. Proceed with the installation as described above.
So I ran both commands and here is the output :
edgar@linux-t7uc:/> uname -a
Linux linux-t7uc 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686 athlon i386 GNU/Linux
edgar@linux-t7uc:/> rpm -qa kernel*
kernel-default-2.6.34-12.3.i586
kernel-default-devel-2.6.34.7-0.7.1.i586
kernel-devel-2.6.34.7-0.7.1.noarch
So the devel packages are version 2.6.34.7-0.7.1 and the kernel is version 2.6.34-12.
How do I install the correct version of the kernel-default-devel and kernel-devel package with zypper?
I thought maybe the versions could be compatible somehow, so I tried to install the Guest Addition and here’s the result :
edgar@linux-t7uc:/media/VBOXADDITIONS_4.0.4_70112> sudo sh ./VBoxLinuxAdditions.run
root’s password:
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.0.4 Guest Additions for Linux…
VirtualBox Guest Additions installer
Removing installed version 4.0.4 of VirtualBox Guest Additions…
Removing existing VirtualBox DKMS kernel modules done
Removing existing VirtualBox non-DKMS kernel modules done
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
zypper install kernel-2.6.34-12-default
failed
Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong.
Once you have corrected it, you can run/etc/init.d/vboxadd setup
to build them.
Doing non-kernel setup of the Guest Additions done
Installing the Window System drivers
Installing X.Org Server 1.8 modules done
Setting up the Window System to use the Guest Additions done
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.Installing graphics libraries and desktop services components done
edgar@linux-t7uc:/media/VBOXADDITIONS_4.0.4_70112>
So I tried
zypper install kernel-2.6.34-12-default
but it doesn’t find the package.
I also looked at /var/log/vboxadd-install.log to see what went wrong, and this is what it says :
Makefile:25: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 -C /usr/src/linux SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo;
echo " ERROR: Kernel configuration is invalid.“;
echo " include/generated/autoconf.h or include/config/auto.conf are missing.”;
echo " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo;
/bin/false)** ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.**mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
** WARNING: Symbol version dump /usr/src/linux-2.6.34.7-0.7/Module.symvers
is missing; modules will have no dependencies and modversions.**make -f scripts/Makefile.build obj=/tmp/vbox.0
/tmp/vbox.0/Makefile:25: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
gcc -Wp,-MD,/tmp/vbox.0/.test.o.d -nostdinc -isystem /usr/lib/gcc/i586-suse-linux/4.5/include -I/usr/src/linux-2.6.34.7-0.7/arch/x86/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fomit-frame-pointer -I/usr/src/linux/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_WITH_HGCM -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -c -o /tmp/vbox.0/test.o /tmp/vbox.0/test.c
/tmp/vbox.0/test.c:1:0: error: code model ‘kernel’ not supported in the 32 bit mode
/tmp/vbox.0/test.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
make[2]: *** [/tmp/vbox.0/test.o] Error 1
make[1]: *** [module/tmp/vbox.0] Error 2
make: *** [vboxadd_test] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
So does anyone know what I should do differently to fix this and get it running?
Thanks, Edgar