Error: Failed to download metadata for repo 'virtualbox': repomd.xml GPG signature verification error: Bad GPG signature

After upgrading from Fedora 37 to Fedora 38, I’m getting the following error when I run sudo dnf upgrade:

Error: Failed to download metadata for repo 'virtualbox': repomd.xml GPG signature verification error: Bad GPG signature

I have run sudo dnf clean all, but the error persists.

How can I fix this?

You will very likely have to uninstall VirtualBox then re-install after upgrade. Your configuration and VM’s should remain. There is a discussion about this very thing here if you search for virtualbox I believe it was just from yesterday.

If you mean this post, it’s not the same issue. In my case VirtualBox works properly. It’s dnf upgrade that gives the error, so I suppose it’s a repository configuration issue, which I would like to fix.

Since VirtualBox is provided by RPM Fusion, the standalone repo is no longer required and can be safely disabled:

sudo dnf config-manager --disable virtualbox
2 Likes

I just did that, removed the previous installation of VirtualBox, and then reinstalled it, this time from RPM Fusion.

However, after that I got the same error as in this post: VirtualBox broke down after upgrage F37 to F38

Following the instructions in the error-informing window, I ran these commands:

sudo dnf install akmod-VirtualBox kernel-devel-$(uname -r)
sudo akmods
sudo systemctl restart vboxdrv.service       

After that, VirtualBox worked properly.

2 Likes

Glad to hear, could you mark your comment as the solution in this case?

Looks like their repo cert file location changed, you can download the latest repo file and it should work fine.

wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo

This way you can keep using the virtualbox repo itself.

2 Likes

Created an account to confirm sqmouse has the correct solution if you replace el with fedora. So:

sudo wget https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo

Worked in 36 and 38. Thank you.

PS: In a pinch, it is always possible to update manually with:

sudo dnf upgrade https://download.virtualbox.org/virtualbox/rpm/fedora/36/x86_64/VirtualBox-7.0-7.0.8_156879_fedora36-1.x86_64.rpm

1 Like