Guest additions can't find installed kernel headers (Alma 9.1 guest, Win10 host)

Discussions about using Linux guests in VirtualBox.
Post Reply
selden
Posts: 65
Joined: 1. Oct 2010, 18:01
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Arch linux
Location: usa

Guest additions can't find installed kernel headers (Alma 9.1 guest, Win10 host)

Post by selden »

Problem:
When I try to install VB Guest Additions in Alma 9.1, the script can't find the installed kernel headers.
What am I doing wrong? Or is there a bug in the script? If so, is there a workaround?

Symptoms:
The Guest Additions script complains that the installed kernel header version is not installed. See the screengrab below.
As best I can tell, the header version installed is the same as the version that the script can't find.
The same failure is seen if I su to root instead of using sudo.

I'm using

VirtualBox 7.0 Version 7.0.8 r156879 (Qt5.15.2) (downloaded and installed on 4/22/2023)
Oracle_VM_VirtualBox_Extension_Pack-7.0.8.vbox-extpack (downloaded 4/22/2023)

Host: Windows 10 Professional 22H2, build 19045.2846
Guest: AlmaLinux 9.1 (Lime Lynx) (RHEL recompile, updated 4/24/2023)

screengrab of GA script failure
screengrab of GA script failure
term.png (97.92 KiB) Viewed 2850 times
Selden
debugger
Posts: 2
Joined: 23. Apr 2023, 13:54

Re: Guest additions can't find installed kernel headers (Alma 9.1 guest, Win10 host)

Post by debugger »

Check

Code: Select all

test -d /lib/modules/`uname -r`/build
In vboxadd.sh:

Code: Select all

            if test -d /lib/modules/"$TARGET_VER"/build; then
                setup_modules "$TARGET_VER"
                depmod
            else
                info "Kernel headers not found for target kernel $TARGET_VER. \
Please install them and execute
  /sbin/rcvboxadd setup"
            fi
selden
Posts: 65
Joined: 1. Oct 2010, 18:01
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Arch linux
Location: usa

Re: Guest additions can't find installed kernel headers (Alma 9.1 guest, Win10 host)

Post by selden »

that test command returns nothing: it just returns to the command prompt.

looking in the versioned directory, build does exist although it's a softlink to a directory which does not exist.

Is there another package which needs to be installed? If so, what is it?

See the screentgrab below.
Attachments
build link and test command
build link and test command
test_build.jpg (108.2 KiB) Viewed 2813 times
Selden
selden
Posts: 65
Joined: 1. Oct 2010, 18:01
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Arch linux
Location: usa

Re: Guest additions can't find installed kernel headers (Alma 9.1 guest, Win10 host)

Post by selden »

Problem resolved:

I also had to install the package kernel-devel
Selden
Post Reply