Can't install powertools on RHEL 8.5

Viewed 1560

I'm new to Linux and I'm trying to setup my RHEL 8.5 VM machine.

NAME="Red Hat Enterprise Linux
VERSION="8.5 (Ootpa)

I'm trying to install some scripts for course, and it is giving an error that PowerTools can't be found

No matching repo to modify: powertools.

I have tried several solution in other posts as follows:

# dnf -y install dnf-plugins-core
# dnf upgrade
# dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf config-manager --set-enabled powertools

The first three commands execute and my system is updated but the last command is still having same error:

Updating Subscription Management repositories.
Error: No matching repo to modify: powertools.

When I try to get repolist, it is not showing powertools

# dnf repolist
Updating Subscription Management repositories.
repo id                                                       repo name
BaseOS                                                        BaseOS
appstream                                                     appstream
codeready-builder-for-rhel-8-x86_64-rpms                      Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)
epel                                                          Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                                                  Extra Packages for Enterprise Linux Modular 8 - x86_64
rhel-8-for-x86_64-appstream-rpms                              Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms                                 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

I hope someone can help. Thanks.

2 Answers

There are no exactly "powertools" in RHEL. That's a CentOS alternative name to the trademarked "CodeReady Builder" repo from RHEL.

In RHEL, you enable it like so:

sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

If codeready-builder-for-rhel-8-x86_64-rpms already shows up in "yum repolist", consider that you have "powertools" already enabled, no action is needed.

Try this for commonly used packages and PowerTools for CentOS 8.x: NOTE: You might only need to rebuild yum (See step d)???

            a) Install epel-release for EL8 Extra Packages

                yum install epel-release javapackages-tools
    
            b) Enable PowerTools

                yum config-manager --set-enabled powertools

                [root@localhost ~]# yum config-manager --set-enabled powertools
                [root@localhost ~]#

            c) Enable javapackages-tools

                yum module enable javapackages-tools

                [root@localhost ~]# yum module enable javapackages-tools
                CentOS Linux 8 - PowerTools                     1.5 MB/s | 2.0 MB     00:01
                Extra Packages for Enterprise Linux Modular 8 - 367 kB/s | 556 kB     00:01
                Extra Packages for Enterprise Linux 8 - x86_64  4.1 MB/s | 8.9 MB     00:02
                Last metadata expiration check: 0:00:01 ago on Tue 16 Mar 2021 11:19:08 AM PDT.
                Dependencies resolved.
                ================================================================================
                 Package           Architecture     Version             Repository         Size
                ================================================================================
                Enabling module streams:
                 javapackages-tools
                                                    201801

                Transaction Summary
                ================================================================================

                Is this ok [y/N]: y
                Complete!

            d) Rebuild yum

                yum clean all
                yum makecache
                yum repolist

                [root@localhost ~]# yum clean all
                49 files removed
                [root@localhost ~]# yum makecache
                CentOS Linux 8 - AppStream                      3.6 MB/s | 6.3 MB     00:01
                CentOS Linux 8 - BaseOS                         1.8 MB/s | 2.3 MB     00:01
                CentOS Linux 8 - Extras                          15 kB/s | 9.6 kB     00:00
                CentOS Linux 8 - PowerTools                     1.0 MB/s | 2.0 MB     00:02
                Extra Packages for Enterprise Linux Modular 8 - 632 kB/s | 612 kB     00:00
                Extra Packages for Enterprise Linux 8 - x86_64  1.5 MB/s | 9.4 MB     00:06
                Metadata cache created.
                [root@localhost ~]#

                [root@localhost ~]# yum repolist
                repo id            repo name
                appstream          CentOS Linux 8 - AppStream
                baseos             CentOS Linux 8 - BaseOS
                epel               Extra Packages for Enterprise Linux 8 - x86_64
                epel-modular       Extra Packages for Enterprise Linux Modular 8 - x86_64
                extras             CentOS Linux 8 - Extras
                powertools         CentOS Linux 8 - PowerTools
Related