Skip to content

Error about not finding python3-libdnf5 on Fedora 42 #65

@geerlingguy

Description

@geerlingguy

I was testing this out on a Fedora 42 cluster with four nodes, and found that it was giving the following error while trying to run dnf-related tasks:

TASK [Update dnf cache.] ***********************************************************************************************
fatal: [node-4.local]: FAILED! => 
    changed: false
    failures: []
    msg: Could not import the libdnf5 python module using /usr/bin/python3 (3.13.5 (main,
        Jun 12 2025, 00:00:00) [GCC 15.1.1 20250521 (Red Hat 15.1.1-2)]). Please install
        python3-libdnf5 package or ensure you have specified the correct ansible_python_interpreter.
        (attempted ['/usr/libexec/platform-python', '/usr/bin/python3', '/usr/bin/python'])

The easy fix is to log into each node separately and run:

sudo dnf install -y python3-libdnf5

But it would be nice to get that figure out for automation...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions