OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Discussions about using Linux guests in VirtualBox.
Post Reply
rhartwig
Posts: 2
Joined: 4. Aug 2023, 16:46
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: OL, Debian
Contact:

OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Post by rhartwig »

Having Guest OL9 U2
on Host = Win11

Code: Select all

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.2
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.2
Red Hat Enterprise Linux release 9.2 (Plow)
Oracle Linux Server release 9.2
when trying to install the VBoxGuestAdditions by executing "sudo sh ./VBoxLinuxAdditions.run"
(as described in <VBOX-Manual>/ch04.html#additions-linux chapter 4.2.2.1)
I get the following output

Code: Select all

[root@db1920 VBox_GAs_7.0.10]# sh ./VBoxLinuxAdditions.run
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.10 Guest Additions for Linux  100%
VirtualBox Guest Additions installer
Removing installed version 7.0.10 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
5.15.0-103.114.4.el9uek.x86_64. Please install them and execute
  /sbin/rcvboxadd setup
ValueError: File context for /opt/VBoxGuestAdditions-7.0.10/other/mount.vboxsf already defined
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted or 'rcvboxadd reload' triggered
VirtualBox Guest Additions: reloading kernel modules and services
VirtualBox Guest Additions: kernel modules were not reloaded
VirtualBox Guest Additions: kernel modules and services were not reloaded
The log file /var/log/vboxadd-setup.log may contain further information.
when trying to install all rpm needed to install VBoxGA (described in <wp>/2021/01/17/mount-shared-folder-oracle-virtualbox/ chapter 1.4) - replacing <wp> by https + // + artikeldamas + wordpress + .com

I get the following errors

Code: Select all

[root@db1920 VBox_GAs_7.0.10]# dnf -y install gcc make perl bzip2  elfutils-libelf-devel xorg-x11-drivers xorg-x11-util
Last metadata expiration check: 3:32:58 ago on Fri 04 Aug 2023 01:34:35 PM CEST.
Package gcc-11.3.1-4.3.0.1.el9.x86_64 is already installed.
Package make-1:4.3-7.el9.x86_64 is already installed.
Package bzip2-1.0.8-8.el9.x86_64 is already installed.
Package elfutils-libelf-devel-0.188-3.el9.x86_64 is already installed.
No match for argument: xorg-x11-util
Error: Unable to find a match: xorg-x11-util
Any ideas what the root cause is?
or how to solve this issue ?


thx & greets
rhartwig
thx & greets
rahartwig
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Post by scottgus1 »

I'm not sure about the info in the Wordpress link, but official info in the Virtualbox manual covers this:
rhartwig wrote: 4. Aug 2023, 17:25 VirtualBox Guest Additions: Kernel headers not found for target kernel
5.15.0-103.114.4.el9uek.x86_64. Please install them
Virtualbox Guest Additions have prerequisites in Linux, same as Virtualbox on the host, see https://www.virtualbox.org/manual/ch04. ... ions-linux and https://www.virtualbox.org/manual/ch02. ... nux-prereq
rhartwig
Posts: 2
Joined: 4. Aug 2023, 16:46
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: OL, Debian
Contact:

Re: OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Post by rhartwig »

Hi,
thx for your fast reply.

I tried to install the kernel headers by executing the follwoing command - but get these errors.

Code: Select all

[root@db1920 VBox_GAs_7.0.10]# yum -y install gcc make perl bzip2 kernel-headers-$(uname -r) kernel-devel-$(uname -r) elfutils-libelf-devel 
Last metadata expiration check: 0:00:27 ago on Fri 04 Aug 2023 05:08:24 PM CEST.
Package gcc-11.3.1-4.3.0.1.el9.x86_64 is already installed.
Package make-1:4.3-7.el9.x86_64 is already installed.
Package bzip2-1.0.8-8.el9.x86_64 is already installed.
No match for argument: kernel-headers-5.15.0-103.114.4.el9uek.x86_64
No match for argument: kernel-devel-5.15.0-103.114.4.el9uek.x86_64
Package elfutils-libelf-devel-0.188-3.el9.x86_64 is already installed.
Any idea to install the headers ?

thx & greets
rhartwig
thx & greets
rahartwig
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Post by scottgus1 »

I'm no Linux guru, we'll have to wait for someone who can interpret these messages better than I can.
Fofola
Posts: 2
Joined: 2. Sep 2023, 10:49

Re: OL 9 U2: cannot install VBoxGuestAdditions -> no kernel headers found

Post by Fofola »

I installed headers on CentOS Stream by

Code: Select all

sudo dnf install kernel-devel
They were newer than my kernel version thus I updated kernel by

Code: Select all

sudo dnf upgrade
and reboot.
Post Reply