Virtual Box Install

Hi,

I am rying to install virtualbox from Sun. I downloaded the 64 bit rpm from Linux_Downloads - VirtualBox and installed it.

I made a virtual machine but cannot power it on. When I run the command VBox, I get the following error code within /var/log/vbox-install.log.

** Compiling vboxdrv
Makefile:147: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

Any idea what I need to do next?

You need the kernel-source and gcc installed.

Read this thread to help you get started:

Virtual Box (Sun Version) Install HowTo - openSUSE Forums

Hey,

I followed the instructions and am now getting a different error.
Here is the error I am getting at /var/log/vbox-install.log. Any ideas:

Makefile:155: 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.
make KBUILD_VERBOSE=1 -C /usr/src/linux SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (
echo;
echo " ERROR: Kernel configuration is invalid.";
echo " include/linux/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/linux/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.31.12-0.1/Module.symvers
is missing; modules will have no dependencies and modversions.

make -f scripts/Makefile.build obj=/tmp/vbox.0
/tmp/vbox.0/Makefile:155: 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.
gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.4/include -Iinclude -I/usr/src/linux-2.6.31.12-0.1/arch/x86/include -include include/linux/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 -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -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 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)" -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
cc1: error: include/linux/autoconf.h: No such file or directory
In file included from /tmp/vbox.0/include/VBox/types.h:34,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:39,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/tmp/vbox.0/include/iprt/types.h:101:31: error: linux/autoconf.h: No such file or directory
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/tmp/vbox.0/linux/…/SUPDrvInternal.h:86:30: error: linux/version.h: No such file or directory
/tmp/vbox.0/linux/…/SUPDrvInternal.h:93:8: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:93:29: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:93:43: error: missing binary operator before token “(”
In file included from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:104,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:115: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:115: error: requested alignment is not a constant
In file included from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:104,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:161:1: warning: “cache_line_size” redefined
In file included from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:28,
from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:104,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/cache.h:64:1: warning: this is the location of the previous definition
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h: In function ‘load_cr3’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:192: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:192: error: (Each undeclared identifier is reported only once
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:192: error: for each function it appears in.)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:241: error: requested alignment is not a constant
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:272: error: requested alignment is not a constant
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h: In function ‘wbinvd_halt’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/processor.h:777: error: implicit declaration of function ‘halt’
In file included from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic.h:4,
from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/thread_info.h:24,
from include/linux/thread_info.h:56,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:104,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:201: warning: type defaults to ‘int’ in declaration of ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:201: error: expected ‘;’, ‘,’ or ‘)’ before ‘’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:213: error: expected ‘)’ before '
’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:225: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: In function ‘atomic64_add’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:228: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:227: error: invalid lvalue in asm output 0
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:227: error: memory input 2 is not directly addressable
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:239: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: In function ‘atomic64_sub’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:242: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:241: error: invalid lvalue in asm output 0
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:241: error: memory input 2 is not directly addressable
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:255: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: In function ‘atomic64_sub_and_test’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:260: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:259: error: invalid lvalue in asm output 0
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:259: error: memory input 3 is not directly addressable
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:271: error: expected ‘)’ before ‘’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:284: error: expected ‘)’ before '
’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:299: error: expected ‘)’ before ‘’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:317: error: expected ‘)’ before '
’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:336: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: In function ‘atomic64_add_negative’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:341: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:340: error: invalid lvalue in asm output 0
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:340: error: memory input 3 is not directly addressable
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:353: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: In function ‘atomic64_add_return’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:357: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:356: error: invalid lvalue in asm output 1
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:356: error: memory input 3 is not directly addressable
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:362: error: expected declaration specifiers or ‘…’ before ‘atomic64_t’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:

Part 2 of my log file:

In function ‘atomic64_sub_return’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:364: error: ‘v’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:364: error: too many arguments to function ‘atomic64_add_return’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:370: error: expected ‘)’ before ‘’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:375: error: expected ‘)’ before '
’ token
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/atomic_64.h:425: error: expected ‘)’ before ‘*’ token
In file included from include/linux/mmzone.h:16,
from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/nodemask.h: In function ‘__first_node’:
include/linux/nodemask.h:239: error: implicit declaration of function ‘find_first_bit’
include/linux/nodemask.h: In function ‘__next_node’:
include/linux/nodemask.h:245: error: implicit declaration of function ‘find_next_bit’
include/linux/nodemask.h: In function ‘__first_unset_node’:
include/linux/nodemask.h:263: error: implicit declaration of function ‘find_first_zero_bit’
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:251:5: warning: “MAX_NR_ZONES” is not defined
include/linux/mmzone.h:253:7: warning: “MAX_NR_ZONES” is not defined
include/linux/mmzone.h:255:7: warning: “MAX_NR_ZONES” is not defined
In file included from include/linux/gfp.h:4,
from include/linux/slab.h:12,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/mmzone.h: At top level:
include/linux/mmzone.h:288: error: ‘MAX_NR_ZONES’ undeclared here (not in a function)
In file included from include/linux/tracepoint.h:18,
from include/trace/events/kmem.h:8,
from include/linux/kmemtrace.h:12,
from include/linux/slab_def.h:17,
from include/linux/slab.h:166,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/rcupdate.h:64:2: error: #error “Unknown RCU implementation specified to kernel configuration”
In file included from include/trace/events/kmem.h:8,
from include/linux/kmemtrace.h:12,
from include/linux/slab_def.h:17,
from include/linux/slab.h:166,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/tracepoint.h: In function ‘tracepoint_synchronize_unregister’:
include/linux/tracepoint.h:156: error: implicit declaration of function ‘__synchronize_sched’
In file included from include/linux/slab_def.h:144,
from include/linux/slab.h:166,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:105,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/kmalloc_sizes.h:5:5: warning: “CONFIG_X86_L1_CACHE_SHIFT” is not defined
include/linux/kmalloc_sizes.h:9:5: warning: “CONFIG_X86_L1_CACHE_SHIFT” is not defined
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/tmp/vbox.0/linux/…/SUPDrvInternal.h:106:8: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:106:30: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:106:44: error: missing binary operator before token “(”
/tmp/vbox.0/linux/…/SUPDrvInternal.h:109:34: error: asm/semaphore.h: No such file or directory
In file included from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from /tmp/vbox.0/linux/…/SUPDrvInternal.h:111,
from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
include/linux/jiffies.h:18:5: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:20:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:22:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:24:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:26:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:28:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:30:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:32:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:34:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:36:7: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:39:3: error: #error Invalid value of HZ.
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: warning: “CONFIG_HZ” is not defined
include/linux/jiffies.h:257:31: error: division by zero in #if
include/linux/jiffies.h:257:46: warning: “SHIFT_HZ” is not defined
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:37:
/tmp/vbox.0/linux/…/SUPDrvInternal.h:193:7: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:193:28: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/…/SUPDrvInternal.h:193:42: error: missing binary operator before token “(”
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:47:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:47:26: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:47:40: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:50:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:50:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:50:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:70:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:70:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:70:41: error: missing binary operator before token “(”
In file included from include/linux/elf.h:7,
from include/linux/module.h:14,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:75,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/elf.h: In function ‘start_ia32_thread’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/elf.h:165: error: implicit declaration of function ‘load_gs_index’
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/elf.h: In function ‘elf_common_init’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/elf.h:180: error: ‘struct thread_struct’ has no member named ‘fs’
In file included from include/linux/module.h:22,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:75,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/module.h:68:2: error: #error unknown processor family
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:76:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:76:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:76:41: error: missing binary operator before token “(”
In file included from include/linux/mm.h:14,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:82,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/mm_types.h:27:5: warning: “CONFIG_SPLIT_PTLOCK_CPUS” is not defined
include/linux/mm_types.h:71:5: warning: “CONFIG_SPLIT_PTLOCK_CPUS” is not defined
In file included from include/linux/mm.h:39,
from /tmp/vbox.0/r0drv/linux/the-linux-

and finally … part 3:

kernel.h:82,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h: In function ‘pmd_page_vaddr’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h:347: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h: In function ‘pud_page_vaddr’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h:418: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h: In function ‘pgd_page_vaddr’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pgtable.h:463: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:82,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/mm.h: In function ‘virt_to_head_page’:
include/linux/mm.h:329: error: implicit declaration of function ‘__pfn_to_page’
include/linux/mm.h:329: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
include/linux/mm.h:329: warning: initialization makes pointer from integer without a cast
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:82,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/mm.h:465:63: warning: “NR_PAGEFLAGS” is not defined
include/linux/mm.h:513:62: warning: “NR_PAGEFLAGS” is not defined
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:82,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/mm.h: In function ‘lowmem_page_address’:
include/linux/mm.h:603: error: implicit declaration of function ‘__page_to_pfn’
include/linux/mm.h:603: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
include/linux/mm.h:941:5: warning: “CONFIG_SPLIT_PTLOCK_CPUS” is not defined
In file included from include/linux/hardirq.h:10,
from include/linux/pagemap.h:15,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:83,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/hardirq.h: At top level:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/hardirq.h:29: error: requested alignment is not a constant
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:83,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/pagemap.h: In function ‘fault_in_pages_writeable’:
include/linux/pagemap.h:399: error: implicit declaration of function ‘__copy_to_user_ll’
In file included from include/linux/sched.h:77,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:86,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/proportions.h: In function ‘prop_inc_percpu’:
include/linux/proportions.h:75: error: implicit declaration of function ‘local_irq_save’
include/linux/proportions.h:77: error: implicit declaration of function ‘local_irq_restore’
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:86,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/sched.h:381:5: warning: “CONFIG_SPLIT_PTLOCK_CPUS” is not defined
In file included from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:87:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:87:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:87:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:90:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:90:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:90:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:95:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:95:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:95:41: error: missing binary operator before token “(”
In file included from include/linux/io.h:22,
from include/linux/pci.h:54,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:100,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/io.h: In function ‘virt_to_phys’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/io.h:99: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/io.h: In function ‘phys_to_virt’:
/usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/io.h:117: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
In file included from include/linux/dma-mapping.h:7,
from include/asm-generic/pci-dma-compat.h:7,
from /usr/src/linux-2.6.31.12-0.1/arch/x86/include/asm/pci.h:129,
from include/linux/pci.h:1129,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:100,
from /tmp/vbox.0/linux/SUPDrv-linux.c:38:
include/linux/scatterlist.h: In function ‘sg_set_buf’:
include/linux/scatterlist.h:112: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
include/linux/scatterlist.h:112: warning: passing argument 2 of ‘sg_set_page’ makes pointer from integer without a cast
include/linux/scatterlist.h:85: note: expected ‘struct page *’ but argument is of type ‘int’
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:118:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:118:26: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:118:40: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:131:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:131:26: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:131:40: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:172:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:172:26: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:172:40: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:206:7: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:206:29: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:206:43: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:208:7: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:208:29: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:208:43: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:226:6: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:226:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:226:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:233:6: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:233:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:233:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:271:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:271:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:271:41: error: missing binary operator before token “(”
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:289:5: warning: “CONFIG_HZ” is not defined
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:291:9: warning: “CONFIG_HZ” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:52:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:52:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:52:41: error: missing binary operator before token “(”
/tmp/vbox.0/linux/SUPDrv-linux.c:213:6: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:213:28: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:213:42: error: missing binary operator before token “(”
/tmp/vbox.0/linux/SUPDrv-linux.c:364:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:364:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:364:41: error: missing binary operator before token “(”
/tmp/vbox.0/linux/SUPDrv-linux.c: In function ‘vboxdrvLinuxUid’:
/tmp/vbox.0/linux/SUPDrv-linux.c:367: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vbox.0/linux/SUPDrv-linux.c:373:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:373:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:373:41: error: missing binary operator before token “(”
/tmp/vbox.0/linux/SUPDrv-linux.c: In function ‘vboxdrvLinuxGid’:
/tmp/vbox.0/linux/SUPDrv-linux.c:376: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vbox.0/linux/SUPDrv-linux.c:382:5: warning: “LINUX_VERSION_CODE” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:382:27: warning: “KERNEL_VERSION” is not defined
/tmp/vbox.0/linux/SUPDrv-linux.c:382:41: error: missing binary operator before token “(”
/tmp/vbox.0/linux/SUPDrv-linux.c: In function ‘vboxdrvLinuxEuid’:
/tmp/vbox.0/linux/SUPDrv-linux.c:385: error: ‘struct task_struct’ has no member named ‘euid’
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [module/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

include/linux/autoconf.h or include/config/auto.conf are missing.

Are the kernel headers installed? Show the output of

zypper se kernel-

…and ‘kernel-$flavour]-devel’ (which is providing include/config/auto.conf), for example ‘kernel-desktop-devel’.

itsamemario, please put such outputs in code-tags or (even better when outputs are huge) use a →nopaste-service.

I never had any luck with this, virtualbox just doesnt seem to work in openSUSE

If you’re having problems with Sun’s free version, try the OSE version. This is provided on the DVD and the OBS and should be running almost immediately when installed.

This isn’t true at all. I use VirtualBox all the time with openSUSE and it works great. For trouble shooting purposes, could you please post the output of

rpm -qa | grep kernel

I never had any luck with this, virtualbox just doesnt seem to work in openSUSE

Oh please please please add “on my machine”. VB works perfectly here and on most other machines.

Hi
Please, please if you have a problem, rather than posting it
doesn’t work in openSUSE, start a thread on what the issue is.

If you think it’s a bug, start a thread and I’m sure (remember we are
all just volunteers) someone will help you if your unsure of what to
say in a bug report.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 6 days 2:03, 4 users, load average: 0.07, 0.11, 0.09
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.53

Here is the output of zypper se kernel:

| Name | Summary | Type
–±-------------------------------±-------------------------------±----------
| devel_kernel | Linux Kernel Development | pattern
| devel_kernel-32bit | devel_kernel-32bit | pattern
i | kernel | Linux Kernel: Security/Bugfi-> | patch
| kernel-coverage | kernel coverage imageing, ga-> | package
| kernel-debug | A Debug Version of the Kernel | package
| kernel-debug | A Debug Version of the Kernel | srcpackage
| kernel-debug-base | A Debug Version of the Kerne-> | package
| kernel-debug-devel | Development files necessary → | package
i | kernel-default | The Standard Kernel | package
| kernel-default | The Standard Kernel | srcpackage
i | kernel-default-base | The Standard Kernel - base m-> | package
i | kernel-default-devel | Development files necessary → | package
i | kernel-desktop | Kernel optimized for the des-> | package
| kernel-desktop | Kernel optimized for the des-> | srcpackage
| kernel-desktop-base | Kernel optimized for the des-> | package
| kernel-desktop-devel | Development files necessary → | package
| kernel-docs | Kernel Documentation | package
| kernel-firmware | Linux kernel firmware files | package
| kernel-pae | Kernel with PAE Support | package
| kernel-pae | Kernel with PAE Support | srcpackage
| kernel-pae-base | Kernel with PAE Support - ba-> | package
| kernel-pae-devel | Development files necessary → | package
| kernel-rt | The Real-Time Linux Kernel | package
| kernel-rt-devel | Development files necessary → | package
| kernel-rt_debug | The Linux Kernel | package
| kernel-rt_debug-devel | Development files necessary → | package
| kernel-rt_trace | The Linux Kernel | package
| kernel-rt_trace-devel | Development files necessary → | package
i | kernel-source | The Linux Kernel Sources | package
| kernel-source | The Linux Kernel Sources | srcpackage
| kernel-source-rt | The Linux Kernel Sources | package
| kernel-source-vanilla | Vanilla Linux kernel sources-> | package
| kernel-syms | Kernel Symbol Versions (modv-> | package
| kernel-syms | Kernel Symbol Versions (modv-> | srcpackage
| kernel-syms-rt | Kernel Symbol Versions (modv-> | package
| kernel-trace | The Realtime Linux Kernel | package
| kernel-trace | The Realtime Linux Kernel | srcpackage
| kernel-trace-base | The Realtime Linux Kernel - → | package
| kernel-trace-devel | Development files necessary → | package
| kernel-vanilla | The Standard Kernel - withou-> | package
| kernel-vanilla | The Standard Kernel - withou-> | srcpackage
| kernel-vanilla-base | The Standard Kernel - withou-> | package
| kernel-vanilla-devel | Development files necessary → | package
i | kernel-xen | The Xen Kernel | package
| kernel-xen | The Xen Kernel | srcpackage
| kernel-xen-base | The Xen Kernel - base modules | package
| kernel-xen-devel | Development files necessary → | package
| kerneloops | Tool to collect kernel oopse-> | package
| kerneloops-applet | Tool to collect kernel oopse-> | package
i | linux-kernel-headers | Linux Kernel Headers | package
| nfs-kernel-server | Support Utilities for Kernel-> | package
| patterns-openSUSE-devel_kernel | Meta package for pattern dev-> | package

Sory here is the output of rpm -qa | grep kernel:

| Name | Summary | Type
–±-------------------------------±-------------------------------±----------
| devel_kernel | Linux Kernel Development | pattern
| devel_kernel-32bit | devel_kernel-32bit | pattern
i | kernel | Linux Kernel: Security/Bugfi-> | patch
| kernel-coverage | kernel coverage imageing, ga-> | package
| kernel-debug | A Debug Version of the Kernel | package
| kernel-debug | A Debug Version of the Kernel | srcpackage
| kernel-debug-base | A Debug Version of the Kerne-> | package
| kernel-debug-devel | Development files necessary → | package
i | kernel-default | The Standard Kernel | package
| kernel-default | The Standard Kernel | srcpackage
i | kernel-default-base | The Standard Kernel - base m-> | package
i | kernel-default-devel | Development files necessary → | package
i | kernel-desktop | Kernel optimized for the des-> | package
| kernel-desktop | Kernel optimized for the des-> | srcpackage
| kernel-desktop-base | Kernel optimized for the des-> | package
| kernel-desktop-devel | Development files necessary → | package
| kernel-docs | Kernel Documentation | package
| kernel-firmware | Linux kernel firmware files | package
| kernel-pae | Kernel with PAE Support | package
| kernel-pae | Kernel with PAE Support | srcpackage
| kernel-pae-base | Kernel with PAE Support - ba-> | package
| kernel-pae-devel | Development files necessary → | package
| kernel-rt | The Real-Time Linux Kernel | package
| kernel-rt-devel | Development files necessary → | package
| kernel-rt_debug | The Linux Kernel | package
| kernel-rt_debug-devel | Development files necessary → | package
| kernel-rt_trace | The Linux Kernel | package
| kernel-rt_trace-devel | Development files necessary → | package
i | kernel-source | The Linux Kernel Sources | package
| kernel-source | The Linux Kernel Sources | srcpackage
| kernel-source-rt | The Linux Kernel Sources | package
| kernel-source-vanilla | Vanilla Linux kernel sources-> | package
| kernel-syms | Kernel Symbol Versions (modv-> | package
| kernel-syms | Kernel Symbol Versions (modv-> | srcpackage
| kernel-syms-rt | Kernel Symbol Versions (modv-> | package
| kernel-trace | The Realtime Linux Kernel | package
| kernel-trace | The Realtime Linux Kernel | srcpackage
| kernel-trace-base | The Realtime Linux Kernel - → | package
| kernel-trace-devel | Development files necessary → | package
| kernel-vanilla | The Standard Kernel - withou-> | package
| kernel-vanilla | The Standard Kernel - withou-> | srcpackage
| kernel-vanilla-base | The Standard Kernel - withou-> | package
| kernel-vanilla-devel | Development files necessary → | package
i | kernel-xen | The Xen Kernel | package
| kernel-xen | The Xen Kernel | srcpackage
| kernel-xen-base | The Xen Kernel - base modules | package
| kernel-xen-devel | Development files necessary → | package
| kerneloops | Tool to collect kernel oopse-> | package
| kerneloops-applet | Tool to collect kernel oopse-> | package
i | linux-kernel-headers | Linux Kernel Headers | package
| nfs-kernel-server | Support Utilities for Kernel-> | package
| patterns-openSUSE-devel_kernel | Meta package for pattern dev-> | package

  1. Please use code-tags for console outputs.

  2. You have three kernels installed, the default, kernel-desktop and kernel-xen? Why? Do you need them all? Which one are you using regularily?

uname -a

I recommend kernel-desktop.

itsamemario, you posted the results of zypper se kernel twice. Please post the results of

rpm -qa | grep kernel

as it will provide the version numbers of your kernels as well.

I’ve installed Virtual Box on 3 PCs.

With a very short read of the instructions, its amazingly easy to install. Works great on openSUSE-11.2. I’m very happy with its great operation on openSUSE-11.2.

If one has problems with it on openSUSE, to solve the problem one first NEEDS to be running openSUSE, and one next needs to post for help and follow the advice. :slight_smile: Reading the instructions also helps a lot. :open_mouth:

Try this method of installation:

From yast, add software repository ‘opensuse Buildservice --virtualization (virtualbox)’ from community repos.

then from yast software management filter the keyword ‘virtualbox’ and install all of them (in this case you may not install the kernel modules for virtualbox of other kernels which you are not using, for e.g. if you boot in “opensuse-kernel-default” then you can only install “virtualbox-ose-kmp-default” from all kernel modules for virtualbox.)
hope this will help.
:slight_smile:

You left out the final words “on my machine”. Lots of people have it working under openSUSE, repeatably. Don’t you think the VBox forums would be flooded by postings by now if there was something about openSUSE that prevented VBox from working? So it is probably just you.