Node JS on Raspbian (Raspberry Pi)

The following works on Raspbian Jessie…

Install Node JS 6:

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Install the Node JS build tools if required:

sudo apt-get install -y build-essential

Check it’s working:

node -v
npm -v


Apparently this only works for ARMv7 and later processors, so this doesn’t work on Raspberry Pi first generations and Zeros.

To install on these, first get the URL to the version you want from (Latest is always

Download and extract the package, eg:

tar -xJf node-v7.10.0-linux-armv6l.tar.xz
cd node-v7.10.0-linux-armv6l

Copy the files to /usr/local:

sudo cp -R * /usr/local/

/usr/local/bin should already be in the path so it should just work.

node -v
npm -v