Dnf5 not working

Hello users, I am facing this issue while using dnf5 for more than 2 weeks now. Initially, I thought that the recent outage listed here https://status.fedoraproject.org/ was causing this issue. Kindly help me resolve it

Pasting the error as well:

[~]$ sudo dnf update
Place your finger on the fingerprint reader
Updating and loading repositories:
terminate called after throwing an instance of ‘libdnf5::UserAssertionError’
what(): libdnf5/repo/repo.cpp:647: libdnf5::repo::SolvRepo& libdnf5::repo::Repo::get_solv_repo() const: API Assertion ‘p_impl->solv_repo’ failed: repo must be loaded to acess solv_repo
[1] 7655 IOT instruction sudo dnf update
[~]$

Never seen this error.
Did you try to cleanup temporary files kept for repositories?
sudo dnf clean all

This is worth reporting as a bug to the dnf maintainers.
See https://docs.fedoraproject.org/en-US/quick-docs/bugzilla-file-a-bug/

Yes I did!

Anything interesting in /var/log/dnf5.log?

Sure!

Nothing as such, everything seems fine in there.

Have you enabled fingerprint authentication,
or did this pop up without you every wanting to use fingerprints?

It often used to ask for fingerprint even before this issue.

So it is not just a DNF5 issue?

Did you enrol your fingerprint at some point?

Yes, for authentication

Maybe what you want to do is remove fingerprint authentication, or set DNF5 to not use fingerprint authentication.

It does seem that DNF5 is working as intended - though it would be nice if it gave you a choice of fingerprint or password.

Edit: I have updated your topic title.

You could also try to identify if it’s a fingerprint issue or a dnf issue, by logging in as sudoer:

$ sudo -i
# dnf upgrade --refresh
1 Like

[~]$ sudo -i
Place your finger on the fingerprint reader
[root@fedora ~]# dnf upgrade --refresh
Updating and loading repositories:

{{Loaded My Repos}}

terminate called after throwing an instance of ‘libdnf5::UserAssertionError’
what(): libdnf5/repo/repo.cpp:647: libdnf5::repo::SolvRepo& libdnf5::repo::Repo::get_solv_repo() const: API Assertion ‘p_impl->solv_repo’ failed: repo must be loaded to acess solv_repo
Aborted (core dumped)
[root@fedora ~]#

I tried the same through the root user, and it gives the following error:

terminate called after throwing an instance of ‘libdnf5::UserAssertionError’
what(): libdnf5/repo/repo.cpp:647: libdnf5::repo::SolvRepo& libdnf5::repo::Repo::get_solv_repo() const: API Assertion ‘p_impl->solv_repo’ failed: repo must be loaded to acess solv_repo
Aborted (core dumped)
[root@fedora ~]#

OK, so the issue can be narrowed down to dnf. Unless others indicate additional steps to try out, you could report the issue as suggested above.

2 Likes

If DNF5 cannot be accessed,
how would the user downgrade, or upgrade DNF5 once a fix is released?

Well, we don’t have enough information about the system.

Is this Fedora 42, which edition/spin? Does it work with dnf4? Does the system get updated with the GUI software manager?

From another discussion, you can disable fingerprint auth with

sudo authselect disable-feature with-fingerprint

Read through How to disable fingerprint request for sudo command on Fedora Linux 33? - #2 by tjdoyle it also contains instructions that may or may not be outdated relating to PAM settings to only disable fingerprint on some occasions

But the problem is not the fingerprint authentication. If fingerprint authentication is enabled, sudo asks for it instead of the password. And as far as I see, this part is working.

1 Like