无法在全屏幕上使用虚拟Box

时间:2017-11-16 15:47:41

标签: windows ubuntu virtual-machine virtualbox

首先,我使用Virtual Box 4.1.4在Windows 7计算机上模拟Xubuntu 14.05.5。

我在VirtualBox上全屏模拟Xubuntu有些麻烦,我尝试了很多在互联网上找到的解决方案,但似乎没有一个能解决我的问题。 首先,我试图从来宾添加模块安装它,但我有这个错误:

  

构建主要的Guest Additions模块......失败!

https://askubuntu.com/questions/204098/error-building-main-guest-additions-module-while-installing-virtualbox-guest-add https://www.youtube.com/watch?v=7xoHpIMPbIc

然后我尝试安装virtualbox guest-x11,但它似乎没有改变任何东西...... 我现在有点卡住了,我希望你们中的一些人能有解决方案......

谢谢大家!

编辑:

 `Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.4 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 5.1.12 of VirtualBox Guest Additions...
vboxadd.sh: Stopping VirtualBox Additions.
You may need to restart your guest system to finish removing the guest drivers.
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.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed.  Not installing
X Window System drivers.
Installing modules ...done.
Installing graphics libraries and desktop services components ...done.`

日志文件:

 Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/4.1.4/source ->
                 /usr/src/vboxguest-4.1.4

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.16.0-30-generic -C /lib/modules/3.16.0-30-generic/build M=/var/lib/dkms/vboxguest/4.1.4/build......(bad exit status: 2)
ERROR (dkms apport): binary package for vboxguest: 4.1.4 not found
Error! Bad return status for module build on kernel: 3.16.0-30-generic (x86_64)
Consult /var/lib/dkms/vboxguest/4.1.4/build/make.log for more information.
Failed to install using DKMS, attempting to install without
grep: /lib/modules/3.16.0-30-generic/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 -C /lib/modules/3.16.0-30-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
    echo >&2;                           \
    echo >&2 "  ERROR: Kernel configuration is invalid.";       \
    echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
    echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
    echo >&2 ;                          \
    /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/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include  -I./arch/x86/include -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include  -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -m64 -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/3.16.0-30-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
/tmp/vbox.0/VBoxGuest-linux.c:199:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’
 static const struct pci_device_id __devinitdata g_VBoxGuestPciId[] =
                                                 ^
/tmp/vbox.0/VBoxGuest-linux.c:147:33: warning: ‘g_fInputDeviceRegistered’ defined but not used [-Wunused-variable]
 static bool                     g_fInputDeviceRegistered = false;
                                 ^
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:75:0,
                 from /tmp/vbox.0/VBoxGuest-linux.c:27:
include/linux/module.h:138:40: error: ‘__mod_pci__g_VBoxGuestPciId_device_table’ aliased to undefined symbol ‘g_VBoxGuestPciId’
   extern const struct type##_device_id __mod_##type##__##name##_device_table \
                                        ^
/tmp/vbox.0/VBoxGuest-linux.c:209:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
 MODULE_DEVICE_TABLE(pci, g_VBoxGuestPciId);
 ^
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

2 个答案:

答案 0 :(得分:0)

好的,我最终找到了解决方案: 我有一个相当旧的客人添加版本(4.1.4),所以我下载了一个较新的版本(4.2.38)here(guest addition.iso),它工作正常!

答案 1 :(得分:0)

以某种方式相关,在更新到Virtual Box 5.1.18之后,我遇到了相同的问题,来宾添加项的安装始终失败。我终于发现问题已被报告,并且解决方案基本上只是安装5.2版本的Virtual Box