Unable to install NGINX in Amazon Linux AMI

Hi folks,

I am trying to install NGINX in Amazon Linux AMI

but when i try to run command

sudo yum install nginx

error is below

Loaded plugins: langpacks, priorities, update-motd
Resolving Dependencies
→ Running transaction check
—> Package nginx.x86_64 0:1.14.0-1.el6.ngx will be installed
→ Processing Dependency: libpcre.so.0()(64bit) for package: nginx-1.14.0-1.el6.ngx.x86_64
→ Finished Dependency Resolution
Error: Package: nginx-1.14.0-1.el6.ngx.x86_64 (nginx)
Requires: libpcre.so.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

Any help would be appreciated!

Thank you!

See here:

Your problem might be finding which version of CentOS your version of AMI is based on.