无法在Debian Buster上安装VBox Guest Additions

时间:2017-08-22 09:49:08

标签: debian vbox

我在Debian Buster上安装VBox Guest Additions时遇到问题。 我的日志:

/var/log/VBoxLinuxAddtions.log

Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd.service → /lib/systemd/system/vboxadd.service.
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: modprobe vboxguest failed.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-service.service → /lib/systemd/system/vboxadd-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-x11.service → /lib/systemd/system/vboxadd-x11.service.

/var/log/vboxadd-install.log

grep: /lib/modules/4.12.0-1-amd64/build/include/linux/version.h: Nie ma takiego pliku ani katalogu
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.12.0-1-amd64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
make -C /usr/src/linux-headers-4.12.0-1-amd64 KBUILD_SRC=/usr/src/linux-headers-4.12.0-1-common \
-f /usr/src/linux-headers-4.12.0-1-common/Makefile 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 /usr/src/linux-headers-4.12.0-1-common/scripts/Makefile.build obj=/tmp/vbox.0
   gcc-6 -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VBoxGuest-linux.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/VBoxGuest$
   gcc-6 -Wp,-MD,/tmp/vbox.0/.VBoxGuest.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-commo$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VBoxGuest.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/VBoxGuest.o"; f$
   gcc-6 -Wp,-MD,/tmp/vbox.0/.GenericRequest.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/GenericRequest.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/GenericReq$
   gcc-6 -Wp,-MD,/tmp/vbox.0/.HGCMInternal.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-co$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/HGCMInternal.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/HGCMInternal$
   gcc-6 -Wp,-MD,/tmp/vbox.0/.Init.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-common/arc$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/Init.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/Init.o"; fi; fi;
   gcc-6 -Wp,-MD,/tmp/vbox.0/.PhysHeap.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-common$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/PhysHeap.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/PhysHeap.o"; fi;$
   gcc-6 -Wp,-MD,/tmp/vbox.0/.SysHlp.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-common/a$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/SysHlp.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/SysHlp.o"; fi; fi;
   gcc-6 -Wp,-MD,/tmp/vbox.0/.VMMDev.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0-1-common/a$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VMMDev.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/VMMDev.o"; fi; fi;
   gcc-6 -Wp,-MD,/tmp/vbox.0/r0drv/.alloc-r0drv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.0$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/alloc-r0drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/r0drv/a$
   gcc-6 -Wp,-MD,/tmp/vbox.0/r0drv/.initterm-r0drv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.1$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/initterm-r0drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/r0dr$
   gcc-6 -Wp,-MD,/tmp/vbox.0/r0drv/.memobj-r0drv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-headers-4.12.$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/memobj-r0drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.0/r0drv/$
   gcc-6 -Wp,-MD,/tmp/vbox.0/r0drv/.mpnotification-r0drv.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-heade$
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/mpnotification-r0drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vbox.$
 if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/r0drv/powernotification-r0drv.o != "scripts/mod/empty.o" ]; then ./scripts/recordmcount  "/tmp/vb$
   gcc-6 -Wp,-MD,/tmp/vbox.0/r0drv/linux/.alloc-r0drv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/6/include -I/usr/src/linux-he$
In file included from /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:31:0:
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘VBoxGuest_RTMemContAlloc’:
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:323:47: error: implicit declaration of function ‘set_pages_x’ [-Werror=implicit-function-declaration]
 # define MY_SET_PAGES_EXEC(pPages, cPages)    set_pages_x(pPages, cPages)
                                               ^
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:445:13: note: in expansion of macro ‘MY_SET_PAGES_EXEC’
             MY_SET_PAGES_EXEC(&paPages[iPage], 1);
             ^~~~~~~~~~~~~~~~~
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function ‘VBoxGuest_RTMemContFree’:
/tmp/vbox.0/r0drv/linux/the-linux-kernel.h:324:47: error: implicit declaration of function ‘set_pages_nx’ [-Werror=implicit-function-declaratio$
 # define MY_SET_PAGES_NOEXEC(pPages, cPages)  set_pages_nx(pPages, cPages)
                                               ^
/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:493:13: note: in expansion of macro ‘MY_SET_PAGES_NOEXEC’
             MY_SET_PAGES_NOEXEC(&paPages[iPage], 1);
             ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.12.0-1-common/scripts/Makefile.build:307: polecenia dla obiektu '/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o' nie powi$
make[4]: *** [/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Błąd 1
/usr/src/linux-headers-4.12.0-1-common/Makefile:1532: polecenia dla obiektu '_module_/tmp/vbox.0' nie powiodły się
make[3]: *** [_module_/tmp/vbox.0] Błąd 2
Makefile:152: polecenia dla obiektu 'sub-make' nie powiodły się
make[2]: *** [sub-make] Błąd 2
Makefile:8: polecenia dla obiektu 'all' nie powiodły się
make[1]: *** [all] Błąd 2
/tmp/vbox.0/Makefile.include.footer:85: polecenia dla obiektu 'vboxguest' nie powiodły się
make: *** [vboxguest] Błąd 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

我尝试安装:dkms build-essential模块助手,然后使用m-a prepare构建内核模块,但它不起作用。 我还尝试将/ etc / fstab行改为" user,exec"但它也没有用。

你能帮帮我吗?

1 个答案:

答案 0 :(得分:1)

我刚刚在VirtualBox中安装了Debian,为了安装VmBoxLinuxAdditions,首先运行此命令:

sudo apt install build-essential linux-headers-`uname -r` dkms

然后安装VBoxLinuxAdditions。