sudo: amazon-linux-extras: command not found
Asked Answered
W

5

23

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

Warpath answered 8/4, 2023 at 17:43 Comment(3)
I tried but it says No match for argument: amazon-linux-extras Error: Unable to find a match: amazon-linux-extrasWarpath
I found another way to install nginx1. I just solved the problemWarpath
SO is a programming Q&A platform and this question is not about programming. What topics can I ask about here? Please delete this.Midrib
A
15

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

Archducal answered 8/5, 2023 at 13:28 Comment(0)
U
9

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>

Undervalue answered 26/5, 2023 at 11:38 Comment(0)
S
2

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.

Splashboard answered 12/4, 2023 at 11:41 Comment(0)
K
0

To install java on Amazon 2023, you can use Amazon Corretto.

First make sure you have the latest version of the system:

sudo dnf update

If you only need the JRE (Java Runtime Environment) for version 8, run:

sudo dnf install java-1.8.0-amazon-corretto

If you only need the JRE (Java Runtime Environment) for version 11, run:

sudo dnf install java-11-amazon-corretto

If you need the full full JDK (Java Development Kit) for version 8, run:

sudo dnf install java-1.8.0-amazon-corretto-devel

If you need the full full JDK (Java Development Kit) for version 11, run:

sudo dnf install java-11-amazon-corretto-devel

To view the current version:

java -version

If you have more than one version installed and want to change the active version, run:

sudo alternatives --config java

The source of this information

Keelson answered 9/9, 2023 at 2:15 Comment(0)
C
-3

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

Cottonweed answered 12/4, 2023 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.