Environment: Alma 8.5
,Centos 7.x
solution
Linux
When installing the software, you need libpcap-devel
this component, execute the command: yum install libpcap-devel
, and report the error as follows:
Last metadata expiration check: 0:05:24 ago on Mon 12 Jun 2023 09:27:18 AM CST.
No match for argument: libpcap-devel
Error: Unable to find a match: libpcap-devel
The corresponding dependency is not matched. Through Google
the search, the main reason for this problem is that the repository CentOS 8 / Rocky Linux 8 / RHEL 8 Linux / Alma Linux
is not enabled by default in systems such as . PowerTools
If you need to use it, you can do it in the following way ( temporarily specify the repository ):
# 临时使用
dnf --enablerepo=powertools install libpcap-devel
Extension: What is PowerTools?
PowerTools
It is an optional warehouse, which CentOS 8 / Rocky Linux 8 / RHEL 8 Linux / Alma Linux
is not enabled by default in systems such as PowerTools
.
This repository contains a number of packages that are required as dependencies when installing other applications, and is mainly for building applications from source; also contains some very useful tools and packages, such as additional development tools, auxiliary software and libraries etc. for developers and system administrators to develop and manage in their systems.
Some of the commonly used tools in PowerTools are as follows:
device-mapper-devel
kmod-devel
maven-common
mariadb-common
opencv
perl-*
cmake
protobuf
- …
If you just want to use it during installation, you can add --enablerepo=powertools
parameters to the command, which only take effect for the current command; if you want to enable it globally, you can use the following method.
yum open PowerTools (global)
Before enabling the repository, the repository PowerTools
needs to be installed first . EPEL
Log into the terminal as root
user and enter the following command:
sudo yum install epel-release
Once installed, enable PowerTools
the repository. The repository can be enabled with the following command PowerTools
:
sudo yum config-manager --set-enabled PowerTools
This command will CentOS
enable PowerTools
the repository in . You can view the warehouse used by the host with the following command:
yum repolist
# 显示如下
repo id repo name
appstream AlmaLinux 8 - AppStream
baseos AlmaLinux 8 - BaseOS
extras AlmaLinux 8 - Extras
powertools AlmaLinux 8 - PowerTools # 出现这行表示启用成功
dnf Open PowerTools (Global)
In RHEL 8 / CentOS 8 / Alma Linux 8
, Dandified Yum
( dnf
) has replaced older versions of yum
the package manager.
Little knowledge :
Dandified
: English // American //ˈdændɪfaɪd
ˈdændɪfaɪd
adj.
: well-dressed; dressed like a playboyv.
: dress fashionable; make like a playboy (past participle of dandify)
Hahaha.
If you want to enable PowerTools
the warehouse, you can execute the following command:
sudo dnf config-manager --set-enabled PowerTools
After executing this command, PowerTools
the repository will be enabled.
You can view the warehouse used by the host with the following command:
dnf repolist
# 显示如下
repo id repo name
appstream AlmaLinux 8 - AppStream
baseos AlmaLinux 8 - BaseOS
extras AlmaLinux 8 - Extras
powertools AlmaLinux 8 - PowerTools
[Note] If not config-manager
, you need to install dnf-config-manager
the plug-in as follows:
# 安装 dnf-config-manager 插件
sudo dnf install 'dnf-command(config-manager)'
# 启用 PowerTools 仓库
sudo dnf config-manager --set-enabled PowerTools
Personal blog: Roc's Blog