Score:-1

AWS EC2 Yum has no repositories

ca flag

I'm a frontend web developer and struggling with this backend stuff!

My goal here is to install and update to PHP 7.4 on my AWS EC2 server.

I need yum to install amazon-linux-extras but yum has no repos.

enter image description here

I have no idea on how to set yum repo list up and finding it very difficult to find any help online about what the repo URLs are and their names etc. NPM is so much easier to work with I think I'll stick to frontend next time. enter image description here

On amazon docs, they state the server comes with configured repos enabled but I'm struggling to find them. (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/add-repositories.html)

Any pointers and help are much appreciated.

in flag
Did you try the suggested commands?
MD Nasirul Islam avatar
ru flag
Try the suggested commands i think it would help
Arden Smith avatar
pe flag
Hey PAL, there is an important ADV for you in the reference shared in your issue description **Important This information applies to Amazon Linux. For information about other distributions, see their specific documentation.**
Score:0
pe flag

Also you can see this previous answer from Ask Ubuntu

amazon ec2 ubuntu apt repos outage?

How do I enable the EPEL repository for my Amazon EC2 instance running CentOS, RHEL, or Amazon Linux?

Last updated: 2021-11-17

I have an Amazon Elastic Compute Cloud (Amazon EC2) instance running CentOS, Red Hat Enterprise Linux (RHEL), or Amazon Linux.

How do I enable access to the Extra Packages for Enterprise Linux (EPEL) repository to allow installation of packages that aren't available in standard repositories?

Short description

Standard repositories might not provide all the packages that can be installed on CentOS, RHEL, or Amazon Linux-based distributions. Enabling the EPEL repository provides additional options for package installation.

Resolution

Follow these steps to download, install, and enable the EPEL repository on RHEL, CentOS, or Amazon Linux-based distributions: Amazon Linux

Amazon Linux 2:

Install the EPEL release package for RHEL 7 and enable the EPEL repository.


sudo amazon-linux-extras install epel -y

Amazon Linux Amazon Machine Image (AMI):

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.


sudo yum-config-manager --enable epel

RHEL

RHEL 8:

Install the EPEL release package for RHEL 8. Enable both the EPEL and CodeReady Builder repositories. The CodeReady Builder repository contains development tools required by many EPEL packages.


sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

sudo dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms

RHEL 7:

Install and enable the EPEL release package for RHEL 7.


sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

CentOS

CentOS 8:

Install the EPEL release package for RHEL 8. Enable both the EPEL and PowerTools repositories. The PowerTools repository contains development tools required by many EPEL packages.


sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y

sudo dnf config-manager --set-enabled PowerTools

CentOS 7:

Install and enable the EPEL release package. CentOS 7 includes the epel-release package in the base repositories.


sudo yum -y install epel-release

List enabled repositories

To verify that the EPEL repository is enabled, run the repolist command.


sudo yum repolist

Happy to help

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.