make -j 8 g++: internal compiler error: Killed (program cc1plus)?

When I deploy Apache Mesos on Ubuntu12.04, I follow the official document, in step "make -j 8" I'm getting this erro...