質問: debian 9へのvirtualbox additionsのインストールエラー virtualbox guest additionsを新しいdebian 9インストールにインストールしようとしていますが、モジュールのビルド時にエラーが発生します。パッケージbuild-essential、module-assistant、dpkg、linux-headers-4.0.3がインストールされています:$ sudo apt install build-essential dpkg linux-headers-4.0.3-3 $ sudo apt build-dep -y linux 私が実行する追加機能をインストールするには:$ sudo mount -o remount,exec,ro /media/cdrom0 $ sudo /media/cdrom0/vboxlinuxaddons.run そしてエラーを取得します:verifying archive integrity... all good. uncompressing virtualbox 5.1.6 guest additions for linux........... virtualbox guest additions installer removing installed version 5.1.6 of virtualbox guest additions... copying additional installer modules ... installing additional modules ... vboxadd.sh: building guest additions kernel modules. failed to set up service vboxadd, please check the log file /var/log/vboxguestadditions.log for details. sergiy@debian-pc-1:~$ ログ/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. ファイル/var/log/vboxadd-install.logに含まれるもの:grep: /lib/modules/4.9.0-3-amd64/build/include/linux/version.h: no such file or directory make kbuild_verbose=1 config_module_sig= -c /lib/modules/4.9.0-3-amd64/build subdirs=/tmp/vbox.0 srcroot=/tmp/vbox.0 -j1 modules make -c /usr/src/linux-headers-4.9.0-3-amd64 kbuild_src=/usr/src/linux-headers-4.9.0-3-common \ -f /usr/src/linux-headers-4.9.0-3-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.9.0-3-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.9.0-3-common/arch/x86/ ------------------------------------------------ in file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:98:0, from /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:31: /usr/src/linux-headers-4.9.0-3-common/include/linux/mm.h:1298:6: note: declared here long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, ^~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors /usr/src/linux-headers-4.9.0-3-common/scripts/makefile.build:298: recipe for target '/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o' failed make[4]: *** [/tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.o] error 1 /usr/src/linux-headers-4.9.0-3-common/makefile:1507: recipe for target '_module_/tmp/vbox.0' failed make[3]: *** [_module_/tmp/vbox.0] error 2 makefile:150: recipe for target 'sub-make' failed make[2]: *** [sub-make] error 2 makefile:8: recipe for target 'all' failed make[1]: *** [all] error 2 /tmp/vbox.0/makefile.include.footer:84: recipe for target 'vboxguest' failed make: *** [vboxguest] error 2 creating user for the guest additions. creating udev rule for the guest additions kernel module. 出力uname -a:linux debian-pc-1 4.9.0-3-amd64 #1 smp debian 4.9.30-2+deb9u1 (2017-06-18) x86_64 gnu/linux $ dpkg -l | grep virtualboxコマンドの結果dpkg -l | grep virtualboxホストubuntu 16.10の場合:ii virtualbox 5.1.6-dfsg-2 amd64 x86 virtualization solution - base binaries rc virtualbox-5.1 5.1.22-115126~ubuntu~yakkety amd64 oracle vm virtualbox ii virtualbox-dkms 5.1.6-dfsg-2 all x86 virtualization solution - kernel module sources for dkms ii virtualbox-qt 5.1.6-dfsg-2 amd64 x86 virtualization solution - qt based user interface ii virtualbox-source 5.1.6-dfsg-2 all x86 virtualization solution - kernel module source ファイル/etc/apt/sources.list debianゲスト:deb http://deb.debian.org/debian/ stretch-updates main contrib non-free deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free deb http://deb.debian.org/debian/ stretch main contrib non-free deb-src http://deb.debian.org/debian/ stretch main contrib non-free deb http://security.debian.org/ stretch/updates main contrib non-free deb http://httpredir.debian.org/debian stretch-backports main contrib non-free deb-src http://httpredir.debian.org/debian stretch-backports main contrib non-free isoとvirtualboxアドオン5.1.6は、公式サイトからvirtualboxによってダウンロードされました。どうしましたか?それを修正するには?
回答: opと同様の設定をしました。 @ gad3rが提案したことを一度に試しました。最後に、virtualboxの最新バージョン(5.1.24)をインストールし、http://download.virtualbox.org/virtualbox/5.1.24/とは別にゲスト追加をダウンロードすることで解決策を見つけました。