My dnf is broken

output of dnf commands:

[allan@fedora ~]$ sudo dnf update
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.9/site-packages/dnf/", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.9/site-packages/dnf/", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.9/site-packages/libdnf/", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.9/site-packages/libdnf/", line 13, in <module>
    from . import _conf
ImportError: /usr/lib64/python3.9/site-packages/libdnf/ undefined symbol: _ZN6libdnf10ConfigRepo14failovermethodB5cxx11Ev

Hi, welcome to the discussion.
Is it only “update” that causes errors?
could “dnf install dnf” help?

Does this work?
Why not “yum install dnf”?

Aren’t these all this all the same? yum and dnf are both symlinks to /usr/bin/dnf-3

Do sudo dnf clean all and sudo dnf upgrade --refresh do anything or just throw errors?

Shouldn’t that be “dnf reinstall dnf”.
you cannot install something that is already installed.

I see

Dnf Download (DEB, RPM, TXZ, ZST) shows a way to rpm the dnf
(if necessary remove old dnf)