virtual memory exhausted: Cannot allocate memory
As a potential quick fix: You can reduce the memory usage by doing
make -j 1
which tells the build tool to use only one CPU. Worked for me.
Just add a swap file to solve this problem!
// Create a swap file 1 GB
- dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576
- chown root:root /swapfile1
- chmod 0600 /swapfile1
- mkswap /swapfile1
- swapon /swapfile1
// Edit fstab file
- vi /etc/fstab
//Append the following line at the end of file
- /swapfile1 none swap sw 0 0
// Check the swap is ready or not
- free -m