centos 无法在RHEL 8.5上安装powertools

xiozqbni  于 2022-11-07  发布在  其他
关注(0)|答案(2)|浏览(750)

我是Linux新手,我正在尝试设置我的RHEL 8.5虚拟机。

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

我正在尝试安装课程的一些脚本,但出现找不到PowerTools的错误

No matching repo to modify: powertools.

我已经尝试了几个解决方案在其他职位如下:


# 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

前三个命令执行,我的系统更新,但最后一个命令仍然有相同的错误:

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

当我尝试获取repolist时,它没有显示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)

我希望有人能帮上忙。谢谢。

xsuvu9jc

xsuvu9jc1#

在RHEL中没有“powertools“,这是RHEL商标为“CodeReady Builder”的存储库的CentOS替代名称。
在RHEL中,您可以按如下方式启用它:

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

如果codeready-builder-for-rhel-8-x86_64-rpms已经显示在“yum repolist”中,则认为您已经启用了“powertools,”不需要执行任何操作。

r55awzrz

r55awzrz2#

对于常用的软件包和PowerTools for CentOS 8.x,请尝试以下操作:注意:您可能只需要重建yum(请参阅步骤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

相关问题