25

Since I had a lot of trouble finding out how to do this anywhere, I'd like to ask,

how do I enable the PowerTools repository in CentOS 8? (equivalent of CodeReady Linux Builder repo in RHEL 8)

33

You can enable it with the following commands:

yum install dnf-plugins-core

And then:

yum config-manager --set-enabled powertools

Or:

yum config-manager --set-enabled PowerTools

You can also just open /etc/yum.repos.d/CentOS-PowerTools.repo with a text editor and set enabled= to 1 instead of 0'.

Run yum repolist and you'll see it.

EDIT:

The repo is now powertools instead of PowerTools when enabling it with yum. There was a bug so the developers may set it back to what it was before which is why both are listed. The repo file still has the same name.

6
  • 2
    Thanks. I found only the yum config-manager line was needed in my case. – mwfearnley Jan 29 '20 at 14:41
  • Editing /etc/yum.repos.d/CentOS-PowerTools.repo is a nice option. Then you don't need to install to dnf-plugins-core. – wisbucky Jul 28 '20 at 15:28
  • 3
    FYI, this is broken as of today. Need to use "powertools" not "PowerTools". bugs.centos.org/view.php?id=17920 – Alex Hirzel Dec 9 '20 at 17:15
  • @AlexHirzel Updated. – Nasir Riley Dec 9 '20 at 17:38
  • Note that they may fix the bug I linked and your answer could end up being correct :) – Alex Hirzel Dec 9 '20 at 17:41
8

To get more info, run :-

yum info epel-release

Execute the following command:-

sudo yum install epel-release

enable the PowerTools repository since EPEL packages may depend on packages from it:-

sudo yum config-manager --set-enabled PowerTools

You may get an error that read as follows:-

No such command: config-manager. Please use /usr/bin/yum –help

Run the following command to fix it:

sudo yum install 'dnf-command(config-manager)'

And re-run the above command again:-

sudo yum config-manager --set-enabled PowerTools

Now that EPEL repo installed it is time to configure and use it. Hence, run the following command:-

sudo yum update

List your new repos:-

sudo yum repolist
1
  • 1
    The answer from Sukhjinder didn't fix my issue with "Error: Unknown repo: 'PowerTools'". But it worked if I use lower-case, just as it appears in "yum repolist": yum --enablerepo=powertools install elinks – fraber Dec 14 '20 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.