Check the Amazon image version of your EC2 instance.

Command: cat /etc/image-id

If it is Amazon Linux 2023, it does not have extras.

However, most of the packages are already included in the distro.

You can run sudo yum install nginx which will install version 1.22

Answer from User123456 on Stack Overflow
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › al2 extras library
AL2 Extras Library - Amazon Linux 2
Individual Extras topics might be deprecated before AL2 reaches EOL. To list the available topics, use the following command. ... To enable a topic and install the latest version of its package to ensure freshness, use the following command. [ec2-user ~]$ sudo amazon-linux-extras install topic
Discussions

amazonlinux:2022 not support amazon-linux-extras command
Hi, I'm try to use amazonlinux:2022 as our base image, and I can see [amazon-linux-extras] this command everywhere. but actually I got command not found after input amazon-linux-extras install ... More on github.com
🌐 github.com
2
September 8, 2022
amazon-linux-extras not working
![](/media/postImages/original/IMcuzzwxzvREmm3z5SeHOhjg) getting this error please help me to solve this More on repost.aws
🌐 repost.aws
1
0
July 17, 2023
Scripting amazon-linux-extras?
I think I found the proper solution. Rather than doing amazon-linux-extras install, I'm now doing amazon-linux-extras enable which allows the package to be installed via yum. My ansible snippet: name: Enable amazon-linux-extras packages shell: "amazon-linux-extras enable {{item.name}}" become: yes with_items: "{{ amazon_linux_extras_packages }}" More on reddit.com
🌐 r/aws
3
7
June 28, 2018
Docker installation fails on amazon linux 2 when following the official installation method
I know it doesn’t really answer your question, but AL2 goes end of life next year, is there a reason you would not use AL2023? More on reddit.com
🌐 r/aws
19
5
October 12, 2024
🌐
AWS re:Post
repost.aws › knowledge-center › ec2-install-extras-library-software
Install software from the Extras Library on an AL2 EC2 instance | AWS re:Post
June 18, 2025 - Note: AWS regularly updates the Extras Library repository. To activate the topic that you want to use, run the following command: ... Note: Replace php8.1 with the topic name. Example output: $ sudo amazon-linux-extras enable php8 .1Topic php8.1 has end-of-support date of 2024-11-25 2 httpd_modules available [ =1.0 =stable ] 3 memcached1.5 available \ [ =1.5.1 =1.5.16 =1.5.17 ] 9 R3.4 available [ =3.4.3 =stable ] 10 rust1 available \ [ =1.22.1 =1.26.0 =1.26.1 =1.27.2 =1.31.0 =1.38.0 =stable ] 18 libreoffice available \ [ =5.0.6.2_15 =5.3.6.1 =stable ] 19 gimp available [ =2.8.22 ] 20 †docker
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › comparing al2 and al2023 › extra packages for enterprise linux (epel)
Extra Packages for Enterprise Linux (EPEL) - Amazon Linux 2023
Extra Packages for Enterprise Linux (EPEL) is a project in the Fedora community with the objective of creating a large array of packages for enterprise-level Linux operating systems. The project has primarily produced RHEL and CentOS packages. AL2 features a high level of compatibility with ...
🌐
AWS
docs.aws.amazon.com › amazon linux › user guide › al2 on amazon ec2 › configure al2 instances › manage software on your al2 instance › find and install software packages on an al2 instance
Find and install software packages on an AL2 instance - Amazon Linux 2
For more information, see Package management tool in the Amazon Linux 2023 User Guide. You can use the yum search command to search the descriptions of packages that are available in your configured repositories. This is especially helpful if you don't know the exact name of the package you want to install. Simply append the keyword search to the command; for multiple word searches, wrap the search query with quotation marks. ... The following is example output. Loaded plugins: extras_suggestions, langpacks, priorities, update-motd ============================== N/S matched: find =============
Find elsewhere
🌐
Medium
mavisec.medium.com › install-a-software-package-from-the-extras-library-on-an-ec2-instance-f0ecdb6b94b2
Install a software package from the Extras Library on an EC2 instance - mavisec - Medium
November 21, 2021 - To install a software package from the Extras Library, first confirm that the amazon-linux-extras repository is installed on your instance…
🌐
GitHub
github.com › amazonlinux › container-images › issues › 80
amazonlinux:2022 not support amazon-linux-extras command · Issue #80 · amazonlinux/container-images
September 8, 2022 - Hi, I'm try to use amazonlinux:2022 as our base image, and I can see [amazon-linux-extras] this command everywhere. but actually I got command not found after input amazon-linux-extras install xxx. By the way, the default yum repo provid...
Author   citycan1991
🌐
AWS
aws.amazon.com › about-aws › whats-new › 2019 › 07 › amazon-linux-2-extras-provides-aws-optimized-versions-of-new-linux-kernels
Amazon Linux 2 Extras now provides AWS-optimized versions of new Linux Kernels - AWS
October 6, 2019 - AWS is expanding the Extras catalog in Amazon Linux 2 to include AWS-optimized variants of new Linux Kernel releases. Starting today, an AWS-optimized Linux Kernel 4.19 is now available in Amazon Linux 2 in the Extras channel. The new kernel includes enhancements such as improved performance ...
🌐
YouTube
youtube.com › channel › UCXuqSBlHAE6Xw-yeJA0Tunw
Linus Tech Tips - YouTube
Linus Tech Tips is a passionate team of "professionally curious" experts in consumer technology and video production who aim to educate and entertain.Sponsor...
🌐
Instagram
instagram.com › indianfootball
Instagram
4M Followers, 269 Following, 21K Posts - Indian Football (@indianfootball) on Instagram: "The official Instagram account of the All India Football Federation and Indian Football Team ⚽💙🇮🇳"
🌐
Posit
posit.co › download › rstudio-server
Downloads: RStudio Server
Access the RStudio IDE through your web browser. Download RStudio Server for Debian, Ubuntu, Red Hat, and SLES to provide a centralized, powerful environment for your team.
🌐
AWS
aws.amazon.com › blogs › aws › amazon-linux-2-modern-stable-and-enterprise-friendly
Amazon Linux 2 – Modern, Stable, and Enterprise-Friendly | Amazon Web Services
November 3, 2022 - Long-term support for the Amazon Linux 2 LTS build will include security updates, bug fixes, user-space Application Binary Interface (ABI), and user-space Application Programming Interface (API) compatibility for 5 years. Extras Library – You can now get fast access to fresh, new functionality while keeping your base OS image stable and lightweight.