Solved Manjaro and virtualbox glitch

Solved issue

Danbor

Active Member
Joined
Aug 1, 2023
Messages
222
Reaction score
113
Credits
2,420
Hello all. This problem isn't vital but I would like to solve it. I'm running Virtualbox 7.2.8 and the host id running Mint 22.3
I've been trying to get guest editions installed on a Manjaro virtual machine, and I've encountered an error I can't seem to overcome. When I run the guest editions installer, it tells me that
"Kernel headers not found for target kernel
6.18.26-1-MANJARO. Please install them and execute
/sbin/rcvboxadd setup".
Can anyone tell me how to fix this?
Below is the output from the run command.

❯ sudo sh ./VBoxLinuxAdditions.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.2.8 Guest Additions for Linux 100%
VirtualBox Guest Additions installer
Removing installed version 7.2.8 of VirtualBox Guest Additions...
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
6.18.26-1-MANJARO. Please install them and execute
/sbin/rcvboxadd setup
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted or 'rcvboxadd reload' triggered
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
6.18.26-1-MANJARO. Please install them and execute
/sbin/rcvboxadd setup
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: cannot reload kernel modules: one or more module(s)
is still in use
VirtualBox Guest Additions: The log file /var/log/vboxadd-setup.log may contain
further information.
 


Just like the output tells you:
Bash:
sudo pacman -S linux-headers
/sbin/rcvboxadd setup
Ok, tried that, here is the result ...
sudo pacman -S linux-headers /sbin/rcvboxadd setupcd ..
warning: linux71-headers-7.1.0rc1-1 is up to date -- reinstalling
error: target not found: /sbin/rcvboxadd
warning: '/sbin/rcvboxadd' is a file, did you mean -U/--upgrade instead of -S/--sync?
error: target not found: setupcd
error: target not found: ..
warning: '..' is a file, did you mean -U/--upgrade instead of -S/--sync?
❯ sudo pacman -U linux-headers /sbin/rcvboxadd setupcd ..
loading packages...
error: 'linux-headers': could not find or read package
error: could not open file /sbin/rcvboxadd: Unrecognized archive format
error: '/sbin/rcvboxadd': cannot open package file
error: 'setupcd': could not find or read package
error: could not open file ..: Error reading fd 6
error: '..': cannot open package file
 
Please don't copy these commands all at once, if you pay attention to output you can see why it doesn't work.
Run each line separately...

Option 1:
Bash:
sudo pacman -Syu linux618-headers
/sbin/rcvboxadd setup

Option 2 (IF option 1 doesn't work):
Bash:
sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')
/sbin/rcvboxadd setup
 
Please don't copy these commands all at once, if you pay attention to output you can see why it doesn't work.
Run each line separately...

Option 1:
Bash:
sudo pacman -Syu linux618-headers
/sbin/rcvboxadd setup

Option 2 (IF option 1 doesn't work):
Bash:
sudo pacman -S $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-headers"}' ORS=' ')
/sbin/rcvboxadd setup
Thanks for the help! Much appreciated!
Though neither option fixed the issue, they did direct my investigative direction. Ultimately, I used
sudo pacman -S --needed base-devel, reran /sbin/rcvboxadd setup and rebooted.
Working fine now! And, I added to my limited knowledge.
 


Follow Linux.org

Members online


Top