Closed loclahost closed 10 months ago
I also had a similar problem. I added the following and it worked fine on rocky linux9.
config.vbguest.installer_options = { allow_kernel_upgrade: true, auto_reboot: true }
config.vbguest.installer_hooks[:before_install] = ["dnf -y install epel-release kernel-devel", "sleep 2"]
config.vbguest.installer_hooks[:after_install] = ["dnf -y update", "sleep 2"]
Sadly that does not solve this problem. I added your lines, saw that it installed the packages but the install of the actual guest additions still fails with the same message as I originally posted.
Where did you get your images from? Please test with a different image.
This works fine.
Vagrant.configure("2") do |config|
config.vm.box = "alvistack/centos-9-stream"
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
vb.cpus = 4
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vbguest.installer_options = { allow_kernel_upgrade: true, auto_reboot: true }
end
I am running with the latest image from CentOs
/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
/opt/VBoxGuestAdditions-7.0.2/bin/VBoxClient: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
Not really sure why it's needed, but can you/have you tried install libX11
using the before_install
hook?
Thank you for the suggestion, I have not. But I can unfortunately not try; I do no longer run that setup. It broke both our ST and AT environments so there were no time to wait around for solutions. I changed the guest to Arch Linux instead and everything works.
I am trying to install guest additions in a Centos9 guest from an Arch host, but it fails for me too.
Virtualbox version 7.0.2 Vagrant version 2.3.2 Vagrant plugin list
VagrantFile:
Relevant section of the output:
/var/log/vboxadd-setup.log
Any ideas?