不能用debrant在debian 9上安装VBoxGuestAdditions

时间:2017-10-17 09:19:32

标签: vagrant debian virtualbox

我无法安装VBoxGuestAdditions。 我用vagrant plugin和手动尝试了。在这两种情况下我都遇到了这个错误:

vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.

cat /var/log/VBoxGuestAdditions.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: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..
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.

cat /var/log/vboxadd-install.log

grep: /lib/modules/4.9.0-4-amd64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.9.0-4-amd64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make -C /usr/src/linux-headers-4.9.0-4-amd64 KBUILD_SRC=/usr/src/linux-headers-4.9.0-4-common \
-f /usr/src/linux-headers-4.9.0-4-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)

安装了以下软件包:

apt-get install build-essential dkms

如何解决这个问题?

0 个答案:

没有答案