
Ubuntu 18.04에 VBoxGuestAddition 5.1.2를 설치하려고 하며 다음 명령을 실행하여 필요한 모든 패키지를 설치했습니다.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential dkms module-assistant linux-headers-$(uname -r)
sudo m-a prepare
그런 다음 내가 선택한 장치 -> 게스트 추가 CD 이미지 삽입Vboxguestaddition 설치를 실행하세요. 그러나 이 오류가 발생했습니다.
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.2 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.2 of VirtualBox Guest Additions...
update-initramfs: Generating /boot/initrd.img-5.3.0-28-generic
update-initramfs: Generating /boot/initrd.img-5.3.0-40-generic
update-initramfs: Generating /boot/initrd.img-5.3.0-42-generic
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.
Press Return to close this window...
/var/log/VBoxGuestAdditions.log
그런 다음 파일 을 확인했습니다.
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..
파일 을 검토했을 때 해당 파일이 누락되어 있고 커널 구성이 유효하지 않음을 /var/log/vboxadd-install.log
발견했습니다./lib/modules/5.3.0-42-generic/build/include/linux/version.h
grep: /lib/modules/5.3.0-42-generic/build/include/linux/version.h: No such file
or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/5.3.0-42-generic/build
SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j1 modules
Makefile:227: ================= WARNING ================
Makefile:228: 'SUBDIRS' will be removed after Linux 5.3
Makefile:229:
Makefile:230: If you are building an individual subdirectory
Makefile:231: in the kernel tree, you can do like this:
Makefile:232: $ make path/to/dir/you/want/to/build/
Makefile:233: (Do not forget the trailing slash)
Makefile:234:
Makefile:235: If you are building an external module,
Makefile:236: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:237: ==========================================
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."; \
...
...
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/tmp/vbox.0/VBoxGuest-linux.o' failed
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
Makefile:1655: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] 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.
이 문제를 해결하는 방법을 잘 모르겠습니다. 이미 커널(5.3.0-42-generic) + 헤더, gcc가 설치되어 있지만 /linux/version.h
헤더가 누락된 이유나 커널 구성이 유효하지 않은 이유를 알 수 없습니다 . 어떤 도움이라도 주시면 감사하겠습니다.
답변1
VBoxGuestAdditions 5.1.2가 Ubuntu 18.04와 호환되지 않는 것 같습니다. 가상 박스 관리자를 최신 버전으로 설치하고 최신 VBoxGuestAdditions(16.0.4)를 다운로드하려고 시도했는데 이제 작동합니다.