Install NodeJS v0.12.0 on Raspberry Pi
12 Feb 2015Reasons Why
Here at work I use NodeJS on my Raspberry Pi for quick script hacks. Most notable are quick and dirty API displays such as Twitter Streams, latest code commits from a Bitbucket repository and a dashboard of server information.
This Time
This time we won’t be compiling a binary - but we will use a prepackaged binary that would normally be available from NodeJS.org - but at time of this writeup there is an “Illegal Exception” bug in the prebuilt binaries. We are going to lean on the support from the NodeJS community on this one. More specificily from this website Node-ARM.
Update/Upgrade
First off we need to make sure we have the latest packages installed on our system. A quick update/upgrade from our package manager should do the trick:
Grab the Binary
At the time of this writeup the latest version of NodeJS compiled for Linux ARM is v0.12.0. We will grab the binary by running the wget command from our home directory:
Now we need to run the install process:
And we can verify our installation by checking the –version number:
Install node-gyp
Since we have npm installed it’d be nice to install a global version of the node-gyp command. This command is used to build native commands and is used in a lot of projects I use as a dependency. It’s as easy as:
Questions?
Since we’ve unlocked the potential of a very powerful scripting language for our Raspberry Pi. What are some potential uses you have for your Raspberry Pi?