Question

Can not install Nginx on CentOS 7.

Posted April 2, 2019 963 views
CentOSNode.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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
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

Submit an Answer