我正在尝试在我的 centos8 机器上安装 httpd-devel,但出现以下错误:
[root@localhost tmp]# yum install httpd-devel
Last metadata expiration check: 0:02:01 ago on Mon 22 Aug 2022 11:57:03 AM +04.
No match for argument: httpd-devel
Error: Unable to find a match: httpd-devel
请参阅以下 CentOS-Base.repo:
CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the ##mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[BaseOS]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
请问我为什么会收到以下错误信息:
Error: Unable to find a match: httpd-devel
我也尝试了以下命令但出现同样的错误:
[root@localhost native]# [root@localhost native]# yum install epel-release
CentOS-8 - Base 5.6 kB/s | 3.9 kB 00:00
CentOS Linux 8 - AppStream 14 kB/s | 3.9 kB 00:00
CentOS Linux 8 - BaseOS 15 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Extras 4.8 kB/s | 1.5 kB 00:00
Docker CE Stable - x86_64 14 kB/s | 3.5 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 22 kB/s | 53 kB 00:02
Extra Packages for Enterprise Linux Modular 8 - x86_64 24 kB/s | 63 kB 00:02
Metadata cache created.
[root@localhost native]# yum install httpd-devel
Last metadata expiration check: 0:00:12 ago on Mon 22 Aug 2022 02:26:58 PM +04.
No match for argument: httpd-devel
Error: Unable to find a match: httpd-devel
提前感谢您的建议。
答案1
CentOS 8 已死,不要使用它。不要使用 vault.centos.org 安装新东西,这是一个存档,不会获得更新、安全性或其他东西。
迁移到 RHEL 或其重建版本之一,Alma、Rocky、Oracle。所有这些版本在 appstream repo 中都有 httpd-devel。
如果您想要“抢先体验” RHEL,CentOS Stream 会提供更新,但它不再是重建版本。只有当您有预览 RHEL 开发的明确用例时才迁移到 Stream。
最后,这很复杂,因为模块化软件包使事情变得极其混乱。httpd 在 el8 中是模块化的,因此请参阅模块文档用于特殊的 dnf 命令。
答案2
通过在 CentOS 8 上安装流行的附加存储库:
yum install epel-release
yum makecache
yum install httpd-devel