Ask Your Question
3

How do I fix a broken dnf Fedora28

asked 2018-08-05 12:59:51 -0600

dbsnyder40 gravatar image

updated 2018-08-06 06:51:34 -0600

After playing with conda and possibly reconfiguring python3, I find that dnf no longer works.

$ dnf
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
ModuleNotFoundError: No module named 'dnf'

I have tried using yum and rpm to reinstall dnf. They seem to point back to dnf. I have tried using the gnome software package to delete and install dnfdragora. I see no reference to dnf or dnf-core.

Have I exhausted the easy options?

My next step is to try rebuilding dnf from the github source https://github.com/rpm-software-manag... but the first step

sudo dnf builddep dnf.spec

doesn't look promising, but I will try it anyway. Maybe I can reroute the installation from a LiveCD?

edit retag flag offensive close merge delete

Comments

I made some progress but no luck yet, from

/etc/yum.repos.d/fedora.repo

I found I can reach the repositories at

http://download.fedoraproject.org/pub...

and https://fedora.mirror.constant.com/fe... I was able to find and download the four rpm packages

dnf-2.7.5-12.fc28.noarch.rpm
dnf-conf-2.7.5-12.fc28.noarch.rpm
dnf-plugins-core-2.1.5-4.fc28.noarch.rpm
dnf-yum-2.7.5-12.fc28.noarch.rpm

and I am able to run rpm (unlike what I said above)

sudo rpm --reinstall dnf*

(cont)

dbsnyder40 gravatar imagedbsnyder40 ( 2018-08-05 14:17:05 -0600 )edit

and I am able to run rpm (unlike what I said above)

sudo rpm --reinstall dnf*

but I got warnings like /sbin/ldconfig: libraries libstdc++.so.6.0.24 and libstdc++.so.6.0.25 in directory /lib have same soname but different type.

(I may not be completely upto date.)

but running dnf still gives the error:

No module named 'dnf'

I'm beginning to think I have to reinstall Fedora.

dbsnyder40 gravatar imagedbsnyder40 ( 2018-08-05 14:17:41 -0600 )edit

as stated above I reinstalled dnf. I downloaded the python3 rpm, and a few of the python3-dnf rpms. but before I could install them with rpm, I ran into other problems. I think Gnome went unstable. I could not enter a password to unfreeze the screen. It looked like only one character was processed at a time. Then, after using power button to shut down, the system stopped booting - so I did a reinstall anyway

I think I will create a dedicated conda user and not install anaconda with sudo. Conda and dnf do not play well together.

dbsnyder40 gravatar imagedbsnyder40 ( 2018-08-06 06:51:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-06 10:38:25 -0600

awfed gravatar image

Have a look at this https://bugzilla.redhat.com/show_bug....

To avoid this there will be atomic updates https://teamsilverblue.org/

Me too had a broken Fedora 28 due to iresponsive update but I reinstalled completely. The chance to have an inconsistent system is too big.

Good luck.

edit flag offensive delete link more

Comments

The link is broken. New link seems to be https://silverblue.fedoraproject.org/

alfC gravatar imagealfC ( 2018-12-02 22:42:19 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-05 12:59:51 -0600

Seen: 1,985 times

Last updated: Aug 06 '18