VirtualBox GuestAdditions 5.2.18 在 RHEL7.5 中安装失败

VirtualBox GuestAdditions 5.2.18 在 RHEL7.5 中安装失败

尝试在我的 RHEL7.5 客户机映像上安装 VirtualBox GuestAdditions 5.2.18 时遇到以下问题(我的主机在 Windows 10 上):

Copying additional modules ...
Installing additional modules ...
VirtualBox Guest Additions:Building the VirtualBox Guest Addition kernel modules.  This may take a while.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-4.4.136-4.NSN.el7.x86_64
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
    This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-4.4.136-4.NSN.el7.x86_64
Press Return to close this window...

但可以肯定的是,内核开发-4.4.136-4.NSN.el7.x86_64已经安装(并且重新安装这个包不会改变任何东西)。

的记录/var/log/vboxadd-install.log给出以下内容:

grep: Unmatched ) or \)
chcon: can't apply partial context to unlabeled file 'opt/VBoxGuestAddition-5.2.18/other/mount.vboxsf'
grep: Unmatched ) or \)
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.

的记录/var/log/vboxadd-setup.log给出以下内容:

Building the main Guest Additions module.
Error building the module:
modprobe vboxguest failed.

我真的不知道下一步该看哪里。如果有人有线索,我会很高兴听到他的消息。

更新:大家好,我仍然被这个问题困扰。有人有什么想法可以调查这个问题吗?

更新 2:我已切换到 VB5.2.20,但仍然遇到此问题。我已确保内核头文件 4.4.136-4.NSN.el7.x86_64 位于正确位置 (usr/src/kernels/4.4.136-4.NSN.el7.x86_64)。对我来说,此错误消息与问题的根本原因无关。请帮忙,因为我真的不知道如何调查此问题。

感谢和问候

答案1

经过进一步调查,发现到内核源代码build的符号链接已损坏:/lib/modules/

total 2080
lrwxrwxrwx. 1 root root 42 Jan 14 16:32 build -> /usr/src/kernels/4.4.136-4.NSN.el7.x86_64/

通过手动恢复,它又可以正常工作了!
请注意,原始目标路径是正确的,因此链接因神秘原因而断开....

答案2

与原始问题略有不同,但我在 RHEL 8 beta VM 上安装 Guest Additions 5.2.18 时遇到了同样的问题。升级到带有 Guest Additions 6.0.4 的 VirtualBox 6 解决了该问题。

答案3

我安装了 vbguest 插件,在尝试在新的 vagrant box 上运行“vagrant up”时遇到了此错误。box 仍然启动正常,我能够通过 ssh 进入;但我不确定 OP 是否也是这种情况。我的解决方案是手动卸载 box 上的虚拟框客户添加项。/opt 目录中有一个 shell 文件可以卸载它。然后我执行了 vagrant reload,插件自动安装了最新版本的客户添加项,没有遇到任何错误。希望这对其他来这里寻找的人有所帮助。

相关内容