How do I enable access to the Extra Packages for Enterprise Linux (EPEL) repository to allow installation of packages that are not available in standard repositories?
Standard repositories might not provide all the packages that can be installed on CentOS, Red Hat Enterprise Linux (RHEL), or Amazon Linux-based distributions. Enabling the EPEL repository provides additional options for package installation.
Follow these steps to download, install, and enable the EPEL repository on CentOS, RHEL, or Amazon Linux-based distributions:
Install and enable the EPEL rpm package on RHEL 7 and Amazon Linux 2
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Note: When you install the EPEL rpm package on Amazon Linux 2, the EPEL repository is already enabled.
Install and enable the EPEL rpm package on RHEL 6
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Install and enable the EPEL rpm package on CentOS 7 64-bit, CentOS 6 64-bit, and CentOS 6 32-bit
sudo yum install -y epel-release
Enable the EPEL rpm package on Amazon Linux
The EPEL repository is already installed on the original version of Amazon Linux, but you must enable it. You can enable this repository either by using the yum-config-manager command or by editing the epel.repo file.
Enable the EPEL repository on Amazon Linux by using the yum-config-manager command
sudo yum-config-manager --enable epel
To verify that the EPEL repository is enabled, run the following command:
sudo yum repolist
Enable the EPEL repository on Amazon Linux by using the vim editor to update the epel.repo file
vim /etc/yum.repos.d/epel.repo
Locate and change the entry enabled=0 to enabled=1 that is located in the $basearch section of the epel.repo file.
Save and exit the vim editor.
Did this page help you? Yes | No
Back to the AWS Support Knowledge Center
Need help? Visit the AWS Support Center
Published: 2015-10-01
Updated: 2018-05-08