Ask Your Question
1

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
1

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
1

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

Comments

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/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python3.7/site-packages/dnf/base.py", 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.

https://ask.fedoraproject.org/en/ques...

https://ask.fedoraproject.org/en/ques...

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 213 times

Last updated: Feb 04