Ask Your Question

No module named 'libdnf' ??

asked 2019-02-02 05:47:58 -0500

Abash gravatar image

I am new to Linux and i don't know what were the changes i did, Now i am getting error No module named 'libdnf' . Please help me

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-02-04 04:16:37 -0500

villykruse gravatar image

Do rpm -q dnf and note the current version. Then go to koji and find the package corresponding to the current version of dnf. Open it and you will find a couple of downloads.

Download python3-dnf to your local system and install it using rpm:

rpm --reinstall python3-dnf-xxxxxx.rpm

where xxxxxx depends on the actual version.

edit flag offensive delete link more

answered 2019-02-02 10:50:47 -0500

loboedu gravatar image

In what circunstances are you getting this error? I mean, what are you trying to do? And what changes are you talking about?

Please, for us to help you, give us more information: Fedora version, hardware configuration, packages and softwares installed etc.

edit flag offensive delete link more


Any task related to dnf for eg: dnf update gives error

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python3.7/site-packages/dnf/", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.7/site-packages/dnf/", line 29, in <module>
    import libdnf.transaction
ModuleNotFoundError: No module named 'libdnf'
Abash gravatar imageAbash ( 2019-02-03 05:26:24 -0500 )edit

Have you tried these solutions? Maybe they apply to your case, too.

loboedu gravatar imageloboedu ( 2019-02-03 13:41:04 -0500 )edit

Question Tools

1 follower


Asked: 2019-02-02 05:47:58 -0500

Seen: 683 times

Last updated: Feb 04 '19