Errors

When Composer Cannot Allocate Memory

Error : nmap() failed can no allocate memory. When Composer Cannot Allocate Memory

Sollution 1 :

Increasing the limit in your php.ini file (ex. /etc/php/7.2/apache2/php.ini)

Sollution 2 :

Now if you still run out of memory you can enable swap.

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

sudo /sbin/mkswap /var/swap.1

sudo /sbin/swapon /var/swap.1

The first command may take a few seconds to run, be patient. After the swap is enabled I was able to run composer update again.

🙂 Happy Coding. Keep Liking & Sharing 💻

Tagged ,