When I try to compile Phalcon, I get an error:
virtual memory exhausted: Cannot allocate memory
I am running the following commands
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
I have a VPS with 1GB RAM
Add more swapfile may help. I met this problem when tried to compile YouCompleteMe for vim, solved it by adding swapfile.
https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-14-04
It seems GCC is allocating a lot of memory, check this
https://web.archive.org/web/20141202015428/http://hostingfu.com/article/compiling-with-gcc-on-low-memory-vps
Stopping as many services as possible (Apache, MySQL etc.) will free up more memory, and Phalcon will compile. Worst case scenario you will need to increase the memory of your virtual box.
Thanks to @AndrewD for providing the link that works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With