Issue

CentOS 7 ELS install failed

 

Error: `Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=genclo error was

curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"`

Environment

  • CentOS 7
  • CentOS 7 ELS

Solution

sed -i.bak 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i.bak 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

Cause

CentOS 7 has reached its end-of-life