我正在尝试在我的 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
提前感谢您的建议。
通过在 CentOS 8 上安装流行的附加存储库:
CentOS 8 已经死了,不要使用它。不要使用 vault.centos.org 来安装新的东西,这是一个档案,不会得到更新、安全或其他方面。
迁移到 RHEL 或其重建之一,Alma、Rocky、Oracle。所有这些都在 appstream repo 中有 httpd-devel。
如果您想要“早期访问” RHEL,CentOS Stream 存在并获得更新,但它不再是重建。仅当您有用于预览 RHEL 开发的明确用例时才迁移到 Stream。
最后,这很复杂,因为模块化包使事情变得非常混乱。httpd 在 el8 中是模块化的,因此请参阅模块文档了解特殊的 dnf 命令。