无法安装 Virtualbox Guest Additions

无法安装 Virtualbox Guest Additions

我正在尝试在 virtualBox 7.0.4 中的 CentOS8 中安装 Guest Additions,并且主机是 win 10,但无法成功。我按照以下步骤进行操作:

(1)通过以下方式更新内核并安装依赖项:

#dnf update kernal*
#dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
#yum install -y perl gcc kernel-devel kernel-headers make bzip2 xorg-x11-drivers xorg-x11-utils elfutils-libelf-devel

(2)通过以下方式将 KERN_DIR 添加到环境中:

#KERN_DIR=/usr/src/kernels/`uname -r`
#export KERN_DIR

(3)挂载 virtualbox iso

#mkdir /mnt/iso
#mount ~Public/virtualbox/VBoxGuestAdditions_7.0.4.iso /mnt/iso
#cd /mnt/iso

(4)安装 Guest Additions

#./VBoxLinuxAdditions.run

我收到以下错误:

 Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.4 Guest Additions for Linux  100%  
VirtualBox Guest Additions installer
/usr/sbin/vbox-uninstall-guest-additions: line 9: /opt/VBoxGuestAdditions-7.0.4/uninstall.sh: No such file or directory
Failed to remove existing installation.  Aborting...

您知道如何解决这个问题吗?

先感谢您!

答案1

无意中删除文件夹时出现与您相同的错误 /opt/VBoxGuestAdditions-7.0.6/

按照另一个论坛(不记得是哪个了)的快速解决方案是删除/重命名以下文件:

vmbox-uninstall-guest-additions/usr/sbin directory

然后重新运行 Guest Additions 安装 sh,它将跳过该uninstall.sh部分并按正常方式继续安装脚本。

相关内容