Can’t find rpm nevra’ errors | howto reproduce

,

Barry A ScottIf you build it… (Koji Success II)

Aug 2023

I hit a problem that is baffling me.

After an dnf update or dnf install I see an error doing a dnf history rollback.

What does the Cannot find rpm nevra error mean?

In the first case that I saw this in I could downgrade and reinstall the named package.
All the nevra can be found in enabled repos. But rollback gives up after the error.

This is the output from the rollback

Following this install

# dnf history rollback 34
Last metadata expiration check: 1:55:02 ago on Tue 22 Aug 2023 15:45:07 UTC.
Error: The following problems occurred while running a transaction:
  Cannot find rpm nevra "platform-python-3.6.8-47.0.1.el8_6.x86_64".
  Cannot find rpm nevra "python3-libs-3.6.8-47.0.1.el8_6.x86_64".
[root@prx29a ~]# dnf install python3-devel
Last metadata expiration check: 1:54:39 ago on Tue 22 Aug 2023 15:45:07 UTC.
Dependencies resolved.
==============================================================================================================
 Package                  Arch     Version                                   Repository                  Size
==============================================================================================================
Installing:
 python3-devel            x86_64   3.6.8-45.0.1.el8                          odsoracle_distro_builder    64 k
Installing dependencies:
 platform-python-devel    x86_64   3.6.8-45.0.1.el8                          odsoracle_AppStream        250 k
 python3-rpm-generators   noarch   5-7.el8                                   odsoracle_AppStream         25 k
 python36-devel           x86_64   3.6.8-38.module+el8.5.0+20329+5c5719bc    odsoracle_AppStream         16 k
Downgrading:
 platform-python          x86_64   3.6.8-45.0.1.el8                          odsoracle_BaseOS            85 k
 python3-libs             x86_64   3.6.8-45.0.1.el8                          odsoracle_BaseOS           7.8 M

Transaction Summary
==============================================================================================================
Install    4 Packages
Downgrade  2 Packages

Total download size: 8.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): platform-python-3.6.8-45.0.1.el8.x86_64.rpm                            458 kB/s |  85 kB     00:00
(2/6): python3-rpm-generators-5-7.el8.noarch.rpm                              760 kB/s |  25 kB     00:00
(3/6): platform-python-devel-3.6.8-45.0.1.el8.x86_64.rpm                      1.0 MB/s | 250 kB     00:00
(4/6): python36-devel-3.6.8-38.module+el8.5.0+20329+5c5719bc.x86_64.rpm       644 kB/s |  16 kB     00:00
(5/6): python3-devel-3.6.8-45.0.1.el8.x86_64.rpm                              1.3 MB/s |  64 kB     00:00
(6/6): python3-libs-3.6.8-45.0.1.el8.x86_64.rpm                                10 MB/s | 7.8 MB     00:00
--------------------------------------------------------------------------------------------------------------
Total                                                                          10 MB/s | 8.3 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                      1/1
  Downgrading      : python3-libs-3.6.8-45.0.1.el8.x86_64                                                 1/8
  Downgrading      : platform-python-3.6.8-45.0.1.el8.x86_64                                              2/8
  Running scriptlet: platform-python-3.6.8-45.0.1.el8.x86_64                                              2/8
  Installing       : python3-rpm-generators-5-7.el8.noarch                                                3/8
  Installing       : platform-python-devel-3.6.8-45.0.1.el8.x86_64                                        4/8
  Installing       : python36-devel-3.6.8-38.module+el8.5.0+20329+5c5719bc.x86_64                         5/8
  Running scriptlet: python36-devel-3.6.8-38.module+el8.5.0+20329+5c5719bc.x86_64                         5/8
  Installing       : python3-devel-3.6.8-45.0.1.el8.x86_64                                                6/8
  Cleanup          : platform-python-3.6.8-47.0.1.el8_6.x86_64                                            7/8
  Running scriptlet: platform-python-3.6.8-47.0.1.el8_6.x86_64                                            7/8
  Cleanup          : python3-libs-3.6.8-47.0.1.el8_6.x86_64                                               8/8
  Running scriptlet: python3-libs-3.6.8-47.0.1.el8_6.x86_64                                               8/8
  Verifying        : platform-python-3.6.8-45.0.1.el8.x86_64                                              1/8
  Verifying        : platform-python-3.6.8-47.0.1.el8_6.x86_64                                            2/8
  Verifying        : python3-libs-3.6.8-45.0.1.el8.x86_64                                                 3/8
  Verifying        : python3-libs-3.6.8-47.0.1.el8_6.x86_64                                               4/8
  Verifying        : platform-python-devel-3.6.8-45.0.1.el8.x86_64                                        5/8
  Verifying        : python3-rpm-generators-5-7.el8.noarch                                                6/8
  Verifying        : python36-devel-3.6.8-38.module+el8.5.0+20329+5c5719bc.x86_64                         7/8
  Verifying        : python3-devel-3.6.8-45.0.1.el8.x86_64                                                8/8

Downgraded:
  platform-python-3.6.8-45.0.1.el8.x86_64                 python3-libs-3.6.8-45.0.1.el8.x86_64
Installed:
  platform-python-devel-3.6.8-45.0.1.el8.x86_64  python3-devel-3.6.8-45.0.1.el8.x86_64
  python3-rpm-generators-5-7.el8.noarch          python36-devel-3.6.8-38.module+el8.5.0+20329+5c5719bc.x86_64

Complete!

I found 1 reason this can happen. I ran dnf install and during dnf install operation pressed Ctrl+C, which screwed up installation of one package. Then I’m getting these ‘can’t find rpm nevra’ errors trying to deal with dnf history. I have no idea how to fix this now.

If there a reason you are asking about installing python3 software for el8 on the fedora forum?

That seems a better question to ask on the RHEL support site.
On a fedora 40 system where I have never done any python changes from the default I see this

$ sudo dnf install python3-devel
Last metadata expiration check: 0:18:10 ago on Mon 16 Sep 2024 09:40:02 AM CDT.
Dependencies resolved.
====================================================================================================================================
 Package                                  Architecture             Version                          Repository                 Size
====================================================================================================================================
Installing:
 python3-devel                            x86_64                   3.12.5-2.fc40                    updates                   313 k
Installing dependencies:
 pyproject-rpm-macros                     noarch                   1.13.0-1.fc40                    updates                    42 k
 python3-rpm-generators                   noarch                   14-10.fc40                       fedora                     30 k
 python3-rpm-macros                       noarch                   3.12-8.fc40                      updates                    12 k
Installing weak dependencies:
 python3-pip                              noarch                   23.3.2-1.fc40                    fedora                    3.2 M

Transaction Summary
====================================================================================================================================
Install  5 Packages

Note that fedora 40 is using python 3.12

Note also that there are many posts on this forum about that specific error message that may provide a solution.

This question has been made in the older topic, the link you can see below the main request. The Blockquote I made while separate the question from it to see what the OP’s question was.

So the versions are old … just not to get too confused.

1 Like