VirtualBox stopped working after a linux update? Here's how to solve it.

This specific scenario has a very simple solution

VirtualBox stopped working after a linux update? Here's how to solve it.

Before starting out, I'd like to mention that this is a very specific scenario that occurred with me where my VirtualBox stopped working after a system packages upgrade. If you face the same problem in a different scenario, please prefer other sources, like stackoverflow or StackExchange.

The Problem

So, currently I am using Fedora 38 in my PC and as I don't allow automatic updates, my PC wasn't updated with latest packages.

So, lately I ran a system update with:

sudo dnf upgrade

and it installed 1.5 GB of packages!

After that when I came to VirtualBox to run my VMs, it showed the following problem:

So, as mentioned, I tried executing:

/sbin/vboxconfig

Which gave the following message:

[root@fedora ~]# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
egrep: warning: egrep is obsolescent; using grep -E
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

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.

And when I checked the logs, I didn't get a thing what it meant.

The Solution

And when I searched a few more pages, I realized that when I did the package update, some new versions of build packages got installed, because of which VirtualBox was failing, which was actually using older build tools, as my version of VirtualBox was 7.0.7, which came out in around June 2023.

So, all I did was install the latest VirtualBox available at the time of writing this article: 7.0.12

And it worked!

Inference

So, what happens is, whenever you update the system packages, with new build tools, like new version of "GCC" or "make", there's a chance that your existing VirtualBox version is not gonna work, as it was using the older version of build stuffs required to run any VM.

So, installing a new version of VirtualBox is most likely gonna work, as a new version will be updated according to the new build tools.

If installing a new version doesn't work, probably try waiting for some more days, until a new VirtualBox version is released.


If you have any more suggestion on how to solve this problem, or if you want to mention something related to this, please feel free to comment!!