报错:Error getting repository data for epel, repository not found

报错原因

系统中未启用 RHEL/CentOS 7.x/6.x/5.x 的 EPEL 存储库。

EPEL 代表企业 Linux 及其在线分布式的额外软件包,可以由 yum 程序自动下载和安装。

只要启用了此选项,错误就会解决

解决方法

CentOS7

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm