I was trying to install nodejs in a VM and I received the following error:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[1]: *** [/usr/local/src/node-v4.2.1/out/Release/obj.target/v8_base/deps/v8/src/hydrogen.o] Error 4
make[1]: Leaving directory `/usr/local/src/node-v4.2.1/out'
make: *** [node] Error 2

I traced this down to being not enough memory and after I increased the RAM to 1024MB it worked fine. I'm amazed node needs so much to compile.