Fedora 32 dnf package manager broken

Greetings, I have several fedora 32 virtual machines all suffering from the same issue after the latest kernel security update. Dnf is throwing the following error

# dnf
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.8/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.8/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.8/site-packages/libdnf/__init__.py", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.8/site-packages/libdnf/conf.py", line 13, in <module>
    from . import _conf
ImportError: /lib64/libdnf.so.2: undefined symbol: modulemd_module_stream_v2_is_static_context

I haven’t seen this particular error anywhere else. It may be due to the fact that I was (foolishly) using Linode VPS kernels rather than booting from Grub2, then ran a kernel upgrade using DNF. So the machine was forcibly being booted into something earlier than the latest kernel but I ran the kernel upgrades anyway.

I have since switched to grub2 and am booting into the correct kernel, but the dnf error persists

# uname -a
Linux hostname 5.11.7-100.fc32.x86_64 #1 SMP Wed Mar 17 19:14:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I have tried booting into previous kernels and dnf still has the same error.

Has anyone heard of this? What would be the easiest course of action to recover DNF (other than a fresh install)

Thanks

I already saw this thread. It’s not the same issue. Thanks though.

Did you see that ?

This is not exactly related. I still have python and site-packages installed correctly. Thanks though

The problem ended up being a version mismatch in libmodulemd

rpm --reinstall --force libmodulemd-2.12.0-1.fc32.x86_64.rpm
rpm -q libmodulemd

libmodulemd-2.9.3-1.fc32.x86_64
libmodulemd-2.12.0-1.fc32.x86_64

erase the old version

rpm -e libmodulemd-2.9.3-1.fc32.x86_64

dnf works now

2 Likes

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