I got too this error when triying to build into a very lowend 128Mb ram box.
Installation FAILED at php, so you dont have it installed.
Once you reach that, all the rest will fail, like the sh: line 46: /usr/local/bin/php: no such file or directory. This is because php was not installed.
You need more RAM or the Swap addition. I have 512Mb ram + 256Mb Swap and i can run it.
Maybe i can share my binaries with you. Also, i guess the CWP proyect can host their own binaries as a facility to the users