![使用 yum 安装 apache 时出现的问题](https://linux22.com/image/1513018/%E4%BD%BF%E7%94%A8%20yum%20%E5%AE%89%E8%A3%85%20apache%20%E6%97%B6%E5%87%BA%E7%8E%B0%E7%9A%84%E9%97%AE%E9%A2%98.png)
当我运行 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>