Não é possível instalar ou construir o driver do kernel do virtualbox no Ubuntu 11.10 64bit

0

Estou tentando instalar o virtualbox-4.1 (do virtualbox.org apt source) no Ubuntu 11.10 e ele não instalará o driver do kernel:

 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                       [ OK ] 
 * Trying to register the VirtualBox kernel modules using DKMS                  Error! Bad return status for module build on kernel: 3.0.0-16-generic (x86_64)
Consult /var/lib/dkms/vboxhost/4.1.8/build/make.log for more information.

 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                        
 * Look at /var/log/vbox-install.log to find out what went wrong

o vbox-install.log contém:

Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.1.8/source ->
                 /usr/src/vboxhost-4.1.8

DKMS: add Completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.0.0-16-generic -C /lib/modules/3.0.0-16-generic/build M=/var/lib/dkms/vboxhost/4.1.8/build....(bad exit status: 2)
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.0.0-16-generic/build 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)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include  -I/usr/src/linux-headers-3.0.0-16-generic/arch/x86/include -Iarch/x86/include/generated -Iinclude  -include include/generated/autoconf.h -Iubuntu/include  -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 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=1024 -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/3.0.0-16-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/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/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
In file included from /usr/src/linux-headers-3.0.0-16-generic/arch/x86/include/asm/ptrace.h:9:0,
                 from /usr/src/linux-headers-3.0.0-16-generic/arch/x86/include/asm/vm86.h:130,
                 from /usr/src/linux-headers-3.0.0-16-generic/arch/x86/include/asm/processor.h:10,
                 from /usr/src/linux-headers-3.0.0-16-generic/arch/x86/include/asm/thread_info.h:22,
                 from include/linux/thread_info.h:53,
                 from include/linux/preempt.h:9,
                 from include/linux/spinlock.h:50,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:103,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:31:
/usr/src/linux-headers-3.0.0-16-generic/arch/x86/include/asm/segment.h:148:23: fatal error: asm/cache.h: No such file or directory
compilation terminated.
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

Eu reinstalei os cabeçalhos linux e o arquivo cache.h não aparece neste diretório. Deveria estar tentando usar x86 sources ou ia64 ?

Isto parece ser devido a linha 26 e linhas 146-147 do cabeçalho x86 segment.h que são:

#ifdef CONFIG_X86_32

e

#else
#include <asm/cache.h>

Este é um bug do kernel ou devo forçar uma compilação de 64 bits?

Atualização: agora acho que o arco está correto - uname -a yeilds

Linux stephenk 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    
por Stephen 28.02.2012 / 23:46

1 resposta

0

Parece que perdi alguns arquivos. sudo apt-get install --reinstall linux-headers-3.0.0.16-generic não funcionou, mas

sudo apt-get remove linux-headers-3.0.0.16
sudo apt-get install linux-headers-3.0.0.16-generic

fez. Presumivelmente, tudo que eu precisava fazer era

sudo apt-get install --reinstall linux-headers-3.0.0.16

Depois disso, sudo /etc/init.d/vboxdrv setup funciona e minhas VMs podem ser executadas.

    
por 29.02.2012 / 00:14