5

I tried to install sudo amazon-linux-extras install nginx1 but it is not working. I'm using MobaXterm to deploy node.js app to AWS EC2.

When I try the command sudo amazon-linux-extras install nginx, it ends up with sudo: amazon-linux-extras: command not found. I also tried the command sudo app update and sudo app install nginx1 but it does not work. Same thing also applies to sudo apt update. Can someone help me fix this issue?enter image description here

Aswin Shaji
  • 65
  • 1
  • 1
  • 4
  • I tried but it says No match for argument: amazon-linux-extras Error: Unable to find a match: amazon-linux-extras – Aswin Shaji Apr 09 '23 at 16:21
  • I found another way to install nginx1. I just solved the problem – Aswin Shaji Apr 09 '23 at 16:25
  • 1
    What was your solution? – anondev Apr 27 '23 at 02:02
  • SO is a programming Q&A platform and this question is not about programming. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) Please delete this. – Rob Jul 18 '23 at 13:02
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Jul 18 '23 at 13:02

4 Answers4

5

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

Laurenswuyts
  • 2,144
  • 4
  • 21
  • 39
User123456
  • 2,492
  • 3
  • 30
  • 44
1

For Amazon Linux 2023 VM, follow the below steps

sudo yum update
sudo yum install stress

Generate CPU stress: stress --cpu <number-of-threads>

Generate memory stress: stress --vm <number-of-threads> --vm-bytes <memory-size>

Generate I/O stress: stress --io <number-of-threads>

Generate disk stress: stress --hdd <number-of-threads>

learner
  • 332
  • 2
  • 6
  • 22
0

That is because you must have picked amazon linux 2023 ami while launching the server the command "amazon-linux-extras" will work only in amazon-linux-2.

-2

You can downgrade the version of your Amazon Linux to something lower such as Amazon Linux 2.