Unable to find or install amazon-linux-extras

1

I am trying to install nginx on AWS EC2 instance. As this is done using amazon-linux-extras as per AWS documentation, I tried that. But I am unable to find the package or install it using yum install(it says that the package is already available but I am unable to find it using 'which'.

Below is the terminal output. Please help.

[arjun@ip-172-31-32-27 ~]$ which amazon-linux-extras

/usr/bin/which: no amazon-linux-extras in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/arjun/.local/bin:/home/arjun/bin)

[arjun@ip-172-31-32-27 ~]$ sudo yum -y install amazon-linux-extras

[sudo] password for arjun:

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                                                                               | 2.4 kB  00:00:00

Package amazon-linux-extras-1.6.9-1.amzn2.noarch already installed and latest version

Nothing to do

Arjun

Posted 2019-09-30T13:03:24.730

Reputation: 11

Found the file in default python2.7 of my AWS Linux 2 instance. But I am still unable to resolve the issue. Used 'find' command and found amazon_linux_extras here: /usr/lib/python2.7/site-packages/amazon_linux_extras – Arjun – 2019-09-30T15:34:23.990

Answers

0

All you need to do is:

amazon-linux-extras enable nginx

Algeriassic

Posted 2019-09-30T13:03:24.730

Reputation: 723

It says that... -bash: amazon-linux-extras: command not found – Arjun – 2019-10-01T05:37:06.920

Are using Amazon Linux 2 AMI or just Amazon Linux AMI? You can check with cat /etc/system-release – Algeriassic – 2019-10-01T20:54:40.897

Amazon Linux 2 AMI. I found a workaround to install nginx though: Using epel-release, that worked fine without the use of amazon-linux-extras... – Arjun – 2019-10-04T06:27:22.700