VirtualBox failures
I just tried to update VirtualBox and encountered some strange problems.
It started when a student of mine tried to update their Fedora 40 host and received an interesting error, “Can’t find VirtualBox COM object … .” They installed VB from the Oracle VirtualBox website using instructions in, Using and Administering Linux, Volume 1.
I tried updating to the latest release of VirtualBox. I currently use the packages in the Fedora rpmfusion-free-updates repo. I got he same error when trying to start the VirtualBox Manager. I then attempted to start VB from the command line with the the result in Figure 1.
$ VirtualBox %U &
[1] 923320
dboth@david:~$
(VirtualBox:923320): dbind-WARNING **: 12:56:34.763: Couldn't connect to accessibility bus: Failed to connect to socket /root/.cache/at-spi/bus_0.0: Permission denied
Figure 1: Launching VirtualBox from the command line results in this error.
I have sometimes found that removing and reinstalling VirtualBox can resolve problems like this. I tried to do that but got strange results. Just to satisfy myself that VB had been removed, I ran the command line program in Figure 2 to see if there were any remnants that I should also delete. Imagine my surprise when I saw all of these remaining packages.
# dnf list installed *VirtualBox* | grep -v Installed
VirtualBox-kmodsrc.noarch 7.1.0-2.fc40 @rpmfusion-free-updates
VirtualBox-server.x86_64 7.1.0-2.fc40 @rpmfusion-free-updates
akmod-VirtualBox.x86_64 7.1.0-1.fc40 @rpmfusion-free-updates
kmod-VirtualBox-6.10.10-200.fc40.x86_64.x86_64 7.1.0-1.fc40 @@commandline
kmod-VirtualBox-6.10.5-200.fc40.x86_64.x86_64 7.0.20-1.fc40 @@commandline
kmod-VirtualBox-6.10.6-200.fc40.x86_64.x86_64 7.0.20-1.fc40 @@commandline
kmod-VirtualBox-6.10.7-200.fc40.x86_64.x86_64 7.0.20-1.fc40 @@commandline
kmod-VirtualBox-6.10.9-200.fc40.x86_64.x86_64 7.0.20-1.fc40 @@commandline
virtualbox-guest-additions.x86_64
Figure 2: This command showed me all the old VB cruft.
The problematic ones are the multiple versions of kmod-VirtualBox. Over the years I’ve installed some versions of VB from the rpm-fusion repositories, and other times from the Oracle download page. It’s obvious that the Oracle version doesn’t clean up after itself very well.
Multiple versions of these packages can cause problems and I needed to get rid of everything — all that cruft. I did that with the command line program in Figure 3.
for X in `dnf list installed *VirtualBox* | grep -v Installed | awk '{ print $1 }'` ; do echo "Working on $X" ; dnf -y remove $X ; done
Figure 3: This command removed all the VirtualBox cruft.
After removing the cruft, I installed VirtualBox from the rpm-fusion repositories, and everything runs now as expected.
I was also surprised by the new VirtualBox Logo in Figure 4. I like the old one better.