Can not install Nginx on CentOS 7.

April 2, 2019 716 views
CentOS Node.js

Hello everybody,
I installed Nginx on CentOS 7 by following link:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7
[root@centos-512mb-nyc3-01 ~]# sudo yum install nginx
But the system show errors:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos.mirror.constant.com
  • epel: ewr.edge.kernel.org
  • extras: centos.mirror.constant.com
  • updates: centos.mirror.constant.com Resolving Dependencies

Is this ok [y/d/N]: y
Downloading packages:
Failed to download prestodelta for repository updates: [Errno 5] [Errno 12] Cannot allocate memory
Error downloading packages:
1:openssl-1.0.2k-16.el76.1.x8664: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-filesystem-1.12.2-2.el7.noarch: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-all-modules-1.12.2-2.el7.noarch: [Errno 5] [Errno 12] Cannot allocate memory
1:openssl-libs-1.0.2k-16.el76.1.x8664: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-http-geoip-1.12.2-2.el7.x8664: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-stream-1.12.2-2.el7.x86
64: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-1.12.2-2.el7.x8664: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-http-xslt-filter-1.12.2-2.el7.x86
64: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-http-image-filter-1.12.2-2.el7.x8664: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-mail-1.12.2-2.el7.x86
64: [Errno 5] [Errno 12] Cannot allocate memory
1:nginx-mod-http-perl-1.12.2-2.el7.x86_64: [Errno 5] [Errno 12] Cannot allocate memory

What will I have to do now?

1 Answer

Hi

Your server doesn’t have enough memory to complete the installation of Nginx.

1:openssl-1.0.2k-16.el76.1.x8664: [Errno 5] [Errno 12]** Cannot allocate memory**

Try stopping the nodejs service while you install Nginx to free up memory for this particular task. Otherwise you’ll need to upgrade RAM.

Cheers

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!