CentOS:- “dnf -y config-manager –set-enabled PowerTools” – “Error: No matching repo to modify: PowerTools.”

Background

Playing around with installing applications on our Linux box running CentOS.

It is a recently rebuilt Linux box and it is running CentOS version 8.

Ran into a little error in the middle of the consequent application installs.

We will talk about the error in this post.

 

Error

Error Image

Error Text


Error: No matching repo to modify: PowerTools.

Scenario

DNF

Config-Manager

Set-Enabled
PowerTools
Image
Text

sudo dnf -y config-manager --set-enabled PowerTools

 

TroubleShooting

Outline

  1. DNF
    • DNF repolist
  2. CentOS
    • Version

DNF

DNF repolist

Syntax


dnf repolist

Sample


dnf repolist

Output

Output – Image

Output – Text

>dnf 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
google-chrome                                             google-chrome
>

CentOS

Version

Let us confirm the major and minor version numbers of the CentOS install.

Syntax


hostnamectl

Sample


hostnamectl

Output

Output – Image

Output – Text

>hostnamectl
Static hostname: labLinux
Icon name: computer-desktop
Chassis: desktop
Machine ID: 89bc2e35a31440b893fc1a04ba918e49
Boot ID: fcce2f3eaef74154ba4c22e3f6875bd6
Operating System: CentOS Linux 8
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-305.7.1.el8_4.x86_64
Architecture: x86-64
>

Explanation

  1. Operating System
    • CentOS Linux 8
  2.  Kernel
    • Kernel: Linux 4.18.0-305.7.1.el8_4.x86_64
      • el8_4.x86_64
      • Marketing Version Major:- 8
      • Marketing Version Minor:- 4

Remediation

Outline

  1. CentOS.Org
    • Naming Change
  2. DNF
    • DNF Config-Manager > Set-Enabled > PowerTools

CentOS.Org

Naming Change

Thankfully, the CentOS.org organization has post confirming and detailing the naming change.

It is available at link.

Image

Text

Recently we’ve done work so that CentOS Stream operates as a distribution independently of CentOS Linux ( Link )

Continuing this work, we made some changes in CentOS Linux 8.3.2011 that make the process of migrating from CentOS Linux to CentOS Stream easier. This meant that we needed to change the name of some files in /etc/yum.repos.d and update repoids to match.

As a good practice with any update, if you have made any local customizations to files in /etc (including the .repo files), you will want to compare with any .rpmnew files that are created for you.

You may also want to update any scripts that you have that specify repoids using the --enablerepo= or --disablerepo= flags

Repoid (8.2.2004 and before) Repoid (8.3.2011 and later)
BaseOS baseos
AppStream appstream
PowerTools powertools
centosplus plus
HighAvailability ha
base-debuginfo debuginfo
Devel devel
BaseOS-source baseos-source
AppStream-source appstream-source
centosplus-source plus-source
base-debuginfo debuginfo

DNF

Config-Manager

Set-Enabled
PowerTools
Image

Text

sudo dnf -y config-manager --set-enabled powertools

 

Validation

DNF

repolist

dnf repolist

Syntax

dnf repolist

Sample

dnf repolist

Image
Text

> dnf 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
google-chrome       google-chrome
powertools          CentOS Linux 8 - PowerTools
>
Explanation
  1. Running “dnf repolist” reveals we now have
    • repo id
      • powertools
    • repo name
      • CentOS Linux 8 – PowerTools

 

References

  1. CentOS.Org
    • CentOS-8 (2011) Release Notes
      • Manuals / ReleaseNotes / CentOS8.2011
        Link
  2. FedoraProject.Org
    • System Administrators Guide
      • Adding, Enabling, and Disabling a DNF Repository
        Link
  3. 2DayGeek
    • Prakash Subramanian
      • How to list the Enabled/Active Repositories in Linux
        Link

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s