Dnf fails to load librpmbuild due to invalid ELF header

I found that the librpmbuild.so is from rpm-build-libs, downloaded the package from Fedora build system via browser, and reinstalled it with rpm:

$ sudo rpm --reinstall rpm-build-libs-4.18.1-3.fc38.x86_64.rpm

This fixed the error and allowed me to complete the upgrade.

1 Like