ArticlesRocky Linux

Python Devel Package Not Available for Rocky Linux 8.10

Introduction

This article addresses an issue surrounding the python3-devel package in Rocky Linux 8.10, after upgrading from 8.9. It provides guidance on proper package usage during development and package building processes.

Problem

When upgrading from Rocky Linux 8.9 to Rocky Linux 8.10, if the python3-devel package was previously installed, the user may see the following error after running the dnf update command:

Error:
 Problem: cannot install both platform-python-3.6.8-62.el8_10.rocky.0.x86_64 from baseos and platform-python-3.6.8-56.el8_9.3.rocky.0.x86_64 from @System
  - package python3-devel-3.6.8-56.el8_9.3.rocky.0.x86_64 from @System requires platform-python = 3.6.8-56.el8_9.3.rocky.0, but none of the providers can be installed
  - cannot install the best update candidate for package platform-python-3.6.8-56.el8_9.3.rocky.0.x86_64
  - problem with installed package python3-devel-3.6.8-56.el8_9.3.rocky.0.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Resolution

1.- Disable the devel repository unless actively building packages. The devel repository is intended only for development/build environments. It may contain packages not included in the base or extras repositories, and is not recommended for general usage.

2.- Use the platform-python-devel package instead of python3-devel. On RHEL, python3-devel is not available. Instead, the appropriate development package is platform-python-devel, which is included in the AppStream repository.

you can use the --allowerasing option to move forward with the update or manually remove the python3-devel package and install platform-python-devel by running:

dnf install platform-python-devel

Notes

Use recommended macros and alternatives for compatibility. You can check the package info by running:

rpm -qpi https://download.rockylinux.org/pub/rocky/8/devel/x86_64/os/Packages/p/python3-devel-3.6.8-62.el8_10.rocky.0.x86_64.rpm

The python3-devel package specifically states:

It also makes the "python3" and "python3-config" commands available for compatibility with some build systems.
When building packages, prefer requiring platform-python-devel and using
the %{__python3} macro instead, if possible.

If the python3 command is needed in this specific case, consider installing the python36 packages instead.

References & related articles

Rocky Linux Documentation, Notes on: Devel