We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Upgrading from 2.0.1 to 2.0.5 getting "virtual memory exhausted: Cannot allocate memory"

..edit... Ubuntu 14.04

I've updated my apps and gotten latest from master as per the instructions here: https://www.phalcon.io/en/download

I didn't do a clone, because the repo was already there... Just did a pull of master.

running the ./install command, this is where it dies:

libtool: compile: gcc -I. -I/home/zhegwood/cphalcon/build/64bits -DPHP_ATOM_INC -I/home/zhegwood/cphalcon/build/64bits/include -I/home/zhegwood/cphalcon/build/64bits/main -I/home/zhegwood/cphalcon/build/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -fvisibility=hidden -c /home/zhegwood/cphalcon/build/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o virtual memory exhausted: Cannot allocate memory make: *** [phalcon.lo] Error 1

My virtual box has 1G of memory... This was adequate for the initial install of 2.0.1, but doesn't seem to be the case now... Is there anything I can do to update to 2.0.5 besides rebuilding with more memory?

edited Jul '15

You can compile from ext/:

git clone http://github.com/phalcon/cphalcon
cd cphalcon/ext
sudo ./install

Or you can add swap to your VM http://www.thegeekstuff.com/2010/08/how-to-add-swap-space/


Installing from ext worked. What is the difference between installing from build and installing from ext? Also, it says don't forget to run 'make test' - What does this do and is it necessary? Thanks!

Installing from build uses a single file to compile the framework which reduces the time to compile but takes more memory. Also, if you use GCC > 4.7 there shouldn't be any difference in terms of optimization in one installation or another.


Right on, thanks for the info!

edited Oct '19

Or you can add swap to your VM http://www.thegeekstuff.com/2010/08/how-to-add-swap-space-and-write my essay fast

Hi, I'm using a 32-bit GCC, can it be the reason? I found a discussion about it here too: