怎样安装PowerTools

2021年4月3日 | 分类: 【技术】

【安装】

参考:https://www.xmodulo.com/how-to-enable-powertools-centos.html 参考:https://stackoverflow.com/questions/58400089/centos-libedit-devel-not-found

默认情况下,在 CentOS 8/RHEL 8 Linux 上未启用 PowerTools 存储库。此存储库包含安装其他应用程序时作为依赖项所需的许多包。

[shell] sudo dnf -y install dnf-plugins-core sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf config-manager --set-enabled powertools sudo dnf repolist [/shell]

查看存储库列表:

[shell] dnf repolist [/shell]

查看存储库 powertools 下的软件列表:

[shell] dnf repo-pkgs powertools list [/shell]

【使用】

[shell] yum -y install libedit-devel [/shell]

或者:

[shell] dnf --enablerepo=powertools install libedit-devel [/shell]

【排错】

报错:Error: Unknown repo: 'PowerTools'

参考:https://forums.centos.org/viewtopic.php?t=76747

Because names of the repos changed in 8.3. It's powertools now.

也就意味着,在 CentOS 8.3 及以后版本,命令中使用 powertools ,而非 PowerTools 。