Compiling Node.js on a 512mb (ve) MediaTemple VPS
The Bad News
You can't. Or at least I couldn't. Make started throwing "virtual memory exhausted: Cannot allocate memory" errors after a few seconds. I tried setting some make flags. I confirmed make was increasing the fail count of 'privvmpages' in /proc/user_beancounters. I started trying to change the swap. And then I found an easier way.
Good News
It is pennies and minutes to upgrade to a VPS with 1gig of RAM, compile node.js, and revert back to your economic 512mb slice. You keep all your data. No problem.
Temporarily (<2hrs) upgrade your MediaTemple (ve) server
1) Enter your MediaTemple console
2) Select 'Upgrade Account'

3) Select the size container you need (1gig works for compiling node js)

4) Wait a few minutes, ssh in, configure && make && make install
5) Reverse the process, going back to the 512mb VPS.
Conclusion
At first I was pretty frustrated that I couldn't compile node. But MediaTemple does let you choose from a lot of new OSes, which is nice, err, pretty much a requirement. I consider myself pretty handy with a linux server, but I want to worry about improving the application and infrastructure, not hacking some memory issue on a shared server because I can't afford more power yet. That is wasted time. But media temple makes it amazingly easy to upgrade and downgrade your box. (mt) ftw!

August 17th, 2010 - 23:21
I was having the same issue and couldn’t get any info from MT, however, I was able to install node on a webbynode slice (512) okay on the same ubuntu distro?
I was also able to install version 1.099 from a tar file without hitting the virtual memory error — not sure if there’s a weired issue with 1.103 and ve servers??
thanks for you post…tho’t i was going crazy!
August 17th, 2011 - 21:25
I have compiled node.js just fine on a VPS with 160MB RAM (256MB Burst). The trick is to skip the `export JOBS=2` step from the installation guide. Using the ArchLinux template on OpenVZ.