使用 yum 安装 apache 时出现的问题

使用 yum 安装 apache 时出现的问题

当我运行 yum install httpd-devel 时,我得到了这个:

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7Server&arch=x86_64&repo=os&infra=$infra error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Erreur inconnue"


 One of the configured repositories failed (Inconnu),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:


Cannot find a valid baseurl for repo: base/7Server/x86_64

我正在使用 rhel 7,我该如何解决这个问题?

答案1

您需要先向 Red Hat 注册服务器,然后才能使用 RHEL 存储库。

如果您有有效的 Redhat 订阅,请执行以下操作:

subscription-manager register --username <username> --password <password>

相关内容