VirtualBox Ubuntu Guest Additions 未安装:modprobe vboxsf 失败

VirtualBox Ubuntu Guest Additions 未安装:modprobe vboxsf 失败

我刚刚从虚拟盒安装了这个软件,我从官方 ubuntu 网站下载了 ISO,是最新 LTS。

我尝试使用“插入 Guest Additions CD 映像”来安装 Guest Additions。结果:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.0 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.2.0 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions 
kernel modules.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find 
out what went wrong
VirtualBox Guest Additions: Running kernel modules will not be replaced 
until the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: modprobe vboxsf failed
Press Return to close this window...

在 /var/log/vboxadd-setup.log 中:

错误:

Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

日志文件的完整版本可在此处找到[?]

答案1

好的,这是一个已知问题。您无需使用 virtualbox 提供的图像,只需通过 aptitute 下载即可sudo apt-get install virtualbox-guest-dkms,如果您需要标题,请下载此文件,sudo apt-get install linux-headers-virtual而不是经典文件sudo apt-get install linux-headers-$(uname -r)

干杯

编辑:按照@Abdelouahab 的指示{}更改了。()

答案2

打开终端并运行sudo reboot

然后尝试通过设备 -> 插入 Guest Additions CD 映像再次安装。

对我有用。

答案3

在 Ubuntu 16.04 中,我必须在安装 virtualbox-guest-additions 之前重新启动操作系统,以便加载正确的内核

答案4

Ubuntu 16.04。

在问题的评论中有一些令人困惑但有用的链接。

通过清除 5.2.8 并从 repo 安装 5.1.34_Ubuntu r121010 解决了同样的问题:

$ grep virtualbox /etc/apt/sources.list
deb https://download.virtualbox.org/virtualbox/debian xenial contrib

客户机添加项安装已完成,没有出现“VirtualBox 客户机添加项:modprobe vboxsf 失败”错误。

sudo purge virtualbox*
sudo apt-add-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox

感谢 Justin 提供的链接https://askubuntu.com/a/846142 但必须使用

sudo apt-get install VirtualBox

而不是

sudo apt-get install VirtualBox-*  

因为最后一个给我带来了一大堆棘手的未满足的依赖关系。

相关内容