Issues Intalling Virtual Box

Hi!

I have the problem, I’m fairly new to linux.
I am trying to install VirtualBox, after installing, it gives me the error below when i try to run it

/sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel “header” files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
kernel-devel kernel-devel-5.4.0-0.rc2.git2.1.fc32.x86_64
This system is currently not set up to build kernel modules.
Please install the Linux kernel “header” files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
kernel-devel kernel-devel-5.4.0-0.rc2.git2.1.fc32.x86_64

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system’s documentation for more information.

I have installed kernel-devel, but still no luck.

Hi,

How are you installing VirtualBox (repo and method)?

Did you install kernel-headers as well? (sudo dnf install kernel-headers )

As far as I am aware, this a frequent problem for Fedora users.

The issue here is that VirtualBox expects the kernel headers in the same version as the kernel. However, Fedora decided to rebuild the headers only if there are changes to it.

For example, on the system I am sitting at right now, it looks like this:

kernel-devel.x86_64                                5.6.16-300.fc32                     @updates-testing                              
kernel-headers.x86_64                              5.6.11-300.fc32                     @updates-testing 

headers and kernel simply don’t match in version number since headers haven’t been updated since the last change in .11.

This seems a bit weird, is your system up-to-date?

Note, since VirtualBox in the Oracle repo became available for F32 in recent days, I installed it yesterday with no problem at all ( I know, it’s not free as in Fedora but I need it for existing, legacy machines).
All I did was sudo dnf install VirtualBox-6.1.

1 Like

Thank you, but i have installed the kernel-headers

Package kernel-headers-5.7.0-1.fc33.x86_64 is already installed.

Package kernel-devel-5.7.0-1.fc33.x86_64 is already installed.

but i still get the above error.

And, what is your Fedora version?

It could be SELinux issue. I had a similar problem, if not the same, as you with a way older Fedora version.
Unfortunately, I do not remember exactly what I did to solve it.
Do you get by any chance a warning from the SELinux Alert Browser?

You could check if SELinux is blocking the configuration of VirtualBox.

  1. Check if SELinux is in Enforcing mode with getenforce
    If the output is Enforcing then you could turn it off.
  2. Disable SELinux temporarily with sudo setenforce 0 and you could check again with getenforce. The output should be now Permissive
  3. Try to run sudo vboxconfig and see if it throws any errors now?

Just curious. Is there a special reason you work with Fedora 33? It is still a beta release.

so basically, installing the above version of kernel solved the problem.
i was also running fedora 33 and the repo oracle has was for 32, so i had to manually edit the repo to get that of fedora 32 and its working.

Thank you guys for the help and different suggestions

I added the repo and running fedora 33

There is no such thing as Fedora 33. Don’t be surprised if software doesn’t work in the development branch of F33. Moreover, Oracle barely relaesed VB for F32.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.