Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a precompiled package of latest nodejs that runs on the raspbian OS?

I would like to install it on my Raspberry Pi and I've been compiling for the last 5 hours without any hope of finishing.

share|improve this question
and i tried to add a 'nodejs' tag but i dont have enough awesomeness to do this here – mkoryak Sep 14 '12 at 15:26
You tried cross-compiling? – Alex Chamberlain Sep 14 '12 at 15:29
Are you asking the same as raspberrypi.stackexchange.com/q/1078/86 ? – Alex Chamberlain Sep 14 '12 at 15:32
@alex: maybe its the same question. it might be OS specific, in which case its a different question – mkoryak Sep 14 '12 at 17:33
Totally, setup a Cross compiler to do it. It will save hours of compile time. – Hellonearthis Sep 14 '12 at 18:10
up vote 1 down vote accepted

This is the better way the latest Node Js in raspberry pi, i love that way, and i think it's easy to to do, and later for update just replace the '/opt/nodejs' folder with the new release:

wget https://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-armv6l.tar.gz

sudo mv node-v4.2.2-linux-armv6l.tar.gz /opt

cd /opt

sudo tar -xzf node-v4.2.2-linux-armv6l.tar.gz

sudo mv node-v4.2.2-linux-armv6l nodejs

sudo rm node-v4.2.2-linux-armv6l.tar.gz

sudo ln -s /opt/nodejs/bin/node /usr/bin/node

sudo ln -s /opt/nodejs/bin/npm /usr/bin/npm
share|improve this answer
Please do not post duplicate answers to multiple questions. The system flags this as an attempt to game the system. – Steve Robillard Nov 7 '15 at 10:36
is his answer correct though? should I accept it? It looks better than the others here – mkoryak Nov 9 '15 at 16:18

A better approach would be cross-compiling. With that you can compile in your desktop machine and install into the RPi.

Take a look at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=7493

share|improve this answer

I was able to compile nodejs without issues using this method:


share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Oliver Salzburg Sep 25 '12 at 17:11

For more recent versions of node than other answers provide, Adafruit has a repository that, as of node v0.12.0 contains pre-compiled node.js.

Essentially, add the repository in Raspbian

curl -sLS https://apt.adafruit.com/add | sudo bash   


sudo apt-get install node

Complete tutorial. Note: Haven't tried this yet, but tutorial was published on 2014-12-19 at 04.57.54 PM and updated 2015-05-04 at 04.27.57 PM so seems more recent than other answers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.