NodeJS and MongoDB on Raspberry Pi

I was hoping that installing these would be as simple as apt-get install nodejs and apt-get install mongodb but it took a little more than that. NodeJS is straightforward but I needed this guide to build and install MongoDB. Even with this, the process took about a day to grind out on the Pi and left me with 75% of my SD card full.

Something they don’t really get into in the guide is that you need use raspi-config to knock the GPU memory down to 32mb in order for the build to succeed. Without that extra memory, the linker will fail with “ld terminated with signal 9 [killed]“.

The next step is to apt-get install npm and you can add express and mongoose to get your app started.