首先我运行了虚拟光驱里的VBoxlinuxAdditions.run,可是显示的是:Unable to build the kernel module.
log文件如下:
Installing VirtualBox 1.5.4 Guest Additions, built Sat Dec 29 09:36:08 CET 2007
Testing the setup of the guest system
Building a test kernel module...
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.27.10-1/build SUBDIRS=/tmp/selfgz33228692/module/test SRCROOT=/tmp/selfgz33228692/module/test 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)
mkdir -p /tmp/selfgz33228692/module/test/.tmp_versions ; rm -f /tmp/selfgz33228692/module/test/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/selfgz33228692/module/test
gcc -Wp,-MD,/tmp/selfgz33228692/module/test/.test.o.d -nostdinc -isystem /usr/lib/gcc/i386-redflag-linux/4.2.1/include -D__KERNEL__ -Iinclude -I/usr/src/kernels/2.6.27.10-1-i686/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-generic -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/2.6.27.10-1/build/include -I/tmp/selfgz33228692/module/test/ -I/tmp/selfgz33228692/module/test/include -I/tmp/selfgz33228692/module/test/r0drv/linux -D__KERNEL__ -DMODULE -D__LINUX__ -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_HGCM -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(test)" -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -c -o /tmp/selfgz33228692/module/test/.tmp_test.o /tmp/selfgz33228692/module/test/test.c
ld -m elf_i386 -r -o /tmp/selfgz33228692/module/test/vboxadd_test.o /tmp/selfgz33228692/module/test/test.o
(cat /dev/null; echo kernel//tmp/selfgz33228692/module/test/vboxadd_test.ko;) > /tmp/selfgz33228692/module/test/modules.order
Building modules, stage 2.
make -f /usr/src/kernels/2.6.27.10-1-i686/scripts/Makefile.modpost
scripts/mod/modpost -m -a -i /usr/src/kernels/2.6.27.10-1-i686/Module.symvers -I /tmp/selfgz33228692/module/test/Module.symvers -o /tmp/selfgz33228692/module/test/Module.symvers -S -w -s
gcc -Wp,-MD,/tmp/selfgz33228692/module/test/.vboxadd_test.mod.o.d -nostdinc -isystem /usr/lib/gcc/i386-redflag-linux/4.2.1/include -D__KERNEL__ -Iinclude -I/usr/src/kernels/2.6.27.10-1-i686/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-generic -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/2.6.27.10-1/build/include -I/tmp/selfgz33228692/module/test/ -I/tmp/selfgz33228692/module/test/include -I/tmp/selfgz33228692/module/test/r0drv/linux -D__KERNEL__ -DMODULE -D__LINUX__ -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBGL_HGCM -DVBOX_HGCM -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vboxadd_test.mod)" -D"KBUILD_MODNAME=KBUILD_STR(vboxadd_test)" -DMODULE -c -o /tmp/selfgz33228692/module/test/vboxadd_test.mod.o /tmp/selfgz33228692/module/test/vboxadd_test.mod.c
ld -r -m elf_i386 --build-id -o /tmp/selfgz33228692/module/test/vboxadd_test.ko /tmp/selfgz33228692/module/test/vboxadd_test.o /tmp/selfgz33228692/module/test/vboxadd_test.mod.o
Inserting the test module module/test/vboxadd_test.ko into the kernel.
Building the VirtualBox Guest Additions kernel module.
make KBUILD_VERBOSE=1 -C /lib/modules/2.6.27.10-1/build SUBDIRS=/tmp/vbox.8 SRCROOT=/tmp/vbox.8 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)
mkdir -p /tmp/vbox.8/.tmp_versions ; rm -f /tmp/vbox.8/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.8
gcc -Wp,-MD,/tmp/vbox.8/.cmc.o.d -nostdinc -isystem /usr/lib/gcc/i386-redflag-linux/4.2.1/include -D__KERNEL__ -Iinclude -I/usr/src/kernels/2.6.27.10-1-i686/arch/x86/include -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-generic -Iinclude/asm-x86/mach-default -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/lib/modules/2.6.27.10-1/build/include -I/tmp/vbox.8/ -I/tmp/vbox.8/include -I/tmp/vbox.8/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBGL_VBOXGUEST -DVBOX_HGCM -DLOG_TO_BACKDOOR -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(cmc)" -D"KBUILD_MODNAME=KBUILD_STR(vboxadd)" -c -o /tmp/vbox.8/.tmp_cmc.o /tmp/vbox.8/cmc.c
在包含自 /tmp/vbox.8/cmc.c:17 的文件中:
/tmp/vbox.8/r0drv/linux/the-linux-kernel.h:55:27: 错误:asm/semaphore.h:没有那个文件或目录
make[2]: *** [/tmp/vbox.8/cmc.o] 错误 1
make[1]: *** [_module_/tmp/vbox.8] 错误 2
make: *** [vboxadd] 错误 2
请大虾们,问这个该如何解决?
hantu 于 2009-06-28 22:27:14发表:
内核源码包安装了没有?
songmuyi 于 2009-06-26 10:25:46发表:
请修改错别字……
jiehe 于 2009-06-25 08:41:29发表:
为什么都是一堆一堆的英文哦。
okzokz123 于 2009-06-24 22:23:32发表:
使用高级功能才可以全屏,安TOOLS,然后CTRL+F 还有看看CTRL+G有没有按错