As a continuation of posting tips and tricks about the Raspberry Pi I thought I would throw in some mini-posts that some people may find useful or interesting. Today’s topic? How to install Node.js
Ready? Lets go!
Quick and dirty
There are a few ways of installing Node.js on your Raspberry Pi. The best way I found was to do it using the source. (Not available via apt-get
? I could be wrong.)
Never-the-less, here was my process. Hopefully I can help anyone else in the process.
Another note: I elected not to attempt to compile with my cross-platform toolchain. There are usually too many moving parts to bother.
Gettin Started
First you need to download the source:
$ curl https://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz > node-v0.10.26.tar.gz
Next, you need to extract node-v0.10.26.tar.gz
$ tar -xvf node-v0.10.26.tar.gz
Change directories to the newly created node-v0.10.26
$ cd node-v0.10.26
Next, run ./configure
$ ./configure
Second to last, run make
and sudo make install
make
sudo make install
Lastly, prepare yourself to wait… this process takes a while. (not kidding)
Enjoy!
Once it’s compiled, feel free to do your thing. Sit tight for more posts coming up about how to use Node.js and your RPi to interact with the outside world.
More Raspberry Pi posts
Want more Raspberry Pi Posts? Click here for more!
Last Modified: 2020.3.7