Sau khi tải xuống iso VBoxGuestAdditions_5.1.0.iso sau đây dựa trên tài liệu sau https://www.vagrantup.com/docs/virtualbox/boxes.html
và sau đó chạy các lệnh sau
sudo mkdir /media/VBoxGuestAdditions
sudo mount -o loop,ro VBoxGuestAdditions_5.1.0.iso /media/VBoxGuestAdditions
sudo sh /media/VBoxGuestAdditions/VBoxLinuxAdditions.run
Tôi nhận được và lỗi:
Không thể thiết lập vboxadd dịch vụ, vui lòng kiểm tra tệp nhật ký /var/log/VBoxGuestAdditions.log để biết chi tiết.
Khi tôi xem lại nhật ký này, nó đề cập đến một tệp nhật ký khác /var/log/vboxadd-install.log
. Khi tôi xem lại nhật ký này, tôi thấy như sau:
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.13.0-93-generic/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: Makefile: No such file or directory
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[1]: *** No rule to make target `Makefile'. Stop.
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
Tôi đã cài đặt các gói sau. Tôi thậm chí đã loại bỏ chúng và thêm chúng một lần nữa:
linux-headers-$(uname -r) linux-generic linux-image-generic linux-headers-generic linux-signed-generic dkms build-essential
Tôi không chắc chắn làm thế nào để gỡ lỗi này hơn nữa. Bất kỳ trợ giúp cho vấn đề sẽ được đánh giá cao.
Ngoài ra, sau đó tôi đã cố gắng sử dụng CD khách bổ sung đi kèm với Hộp ảo. Khi vào CD và chấp nhận cài đặt, điều sau đây xảy ra Khi chèn CD Bổ sung khách, tôi nhận được lỗi sau:
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.4 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 4.3.20 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.
Press Return to close this window...
Sau đó tôi tiến hành xem lại tệp /var/log/VBoxGuestAdditions.log và đây là những gì nó chỉ ra:
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..
Sau đó tôi tiến hành mở /var/log/vboxadd-install.log và tôi thấy như sau:
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
Điều này đặt hệ thống ở trạng thái xấu không có cách nào để phục hồi ngoại trừ bắt đầu lại với hình ảnh.