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/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python3.9/site-packages/libdnf/__init__.py", line 12, in <module>
    from . import conf
  File "/usr/lib64/python3.9/site-packages/libdnf/conf.py", line 13, in <module>
    from . import _conf
ImportError: /usr/lib64/python3.9/site-packages/libdnf/_conf.so: 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

1 Like

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)

Hello,

Reinstall this packages:

https://kojipkgs.fedoraproject.org//packages/libdnf/0.64.0/1.fc34/x86_64/python3-hawkey-0.64.0-1.fc34.x86_64.rpm
https://kojipkgs.fedoraproject.org//packages/libdnf/0.64.0/1.fc34/x86_64/python3-libdnf-0.64.0-1.fc34.x86_64.rpm
https://kojipkgs.fedoraproject.org//packages/dnf/4.9.0/1.fc34/noarch/python3-dnf-4.9.0-1.fc34.noarch.rpm

With RPM

rpm -ivh --force

One user could confirm over Telegram and he told me works.

1 Like