E
E
EVOSandru62018-11-28 12:27:59
linux
EVOSandru6, 2018-11-28 12:27:59

How to solve the problem of installing composer - Cannot allocate memory on CentOs?

There is such a problem:
Hosting on CentOs I execute
the command from under the Docker container:
composer install
The following exception is caused by a lack of memory or swap, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooti... for details
[ErrorException]

proc_open (): fork failed - Cannot allocate
memory

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1

The last command ( /sbin/swapon /var/swap.1 ) gives:
swapon: /var/swap.1: insecure permissions 0644, 0600 suggested.
swapon: /var/swap.1: swapon failed: Operation not permitted

How can I solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hikmat Abdunabiev, 2018-11-28
@EVOSandru6

After mkswap try to do:
chmod 600 /var/swap.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question