Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Steps to install nodejs on Raspberry Pi B+ (armv6)

Steps to install nodejs v6.2 on Raspberry Pi B+ (armv6)

cd ~
wget http://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv6l.tar.gz
tar -xzf node-v6.2.1-linux-armv6l.tar.gz
node-v6.2.1-linux-armv6l/bin/node -v

The last command should print v6.2.1.

Now you can copy it to /usr/local

cd node-v6.2.1-linux-armv6l/
sudo cp -R * /usr/local/

For testing add /usr/local/bin to your path

export PATH=$PATH:/usr/local/bin
node -v
npm -v

This should print 6.2.1 and 3.9.3 for the versions of nodejs and npm. If you need a different version, just pick the one you like from the downloads.

Don't forget to add the PATH to your .bashrc to make it permanent.

To find the correct architecture, you can type uname -m

#Source http://raspberrypi.stackexchange.com/a/48313

@shinlos

This comment has been minimized.

Copy link

@shinlos shinlos commented Apr 8, 2020

Latest version of node you can install for armv6 seems to be v10.19.0
https://nodejs.org/dist/latest-v10.x/node-v10.19.0-linux-armv6l.tar.gz

@edwinh

This comment has been minimized.

Copy link

@edwinh edwinh commented Apr 20, 2020

Latest version of node you can install for armv6 seems to be v11.15.0:
https://nodejs.org/dist/latest-v11.x/node-v11.15.0-linux-armv6l.tar.gz

@dkossman

This comment has been minimized.

@TimTheToaster

This comment has been minimized.

Copy link

@TimTheToaster TimTheToaster commented Aug 3, 2020

commands for current LTS (12.18.3):

wget https://unofficial-builds.nodejs.org/download/release/v12.18.3/node-v12.18.3-linux-armv6l.tar.gz
tar -xzf node-v12.18.3-linux-armv6l.tar.gz
cd node-v12.18.3-linux-armv6l
sudo cp -R * /usr/local
@dkossman

This comment has been minimized.

Copy link

@dkossman dkossman commented Aug 3, 2020

FYI I was unable to get node 12.x to run on my Pi model B2, but I’m running Jessie. Ended up running 11.x

@TimTheToaster

This comment has been minimized.

Copy link

@TimTheToaster TimTheToaster commented Aug 3, 2020

@dkossman Yea, anyone commenting here should probably note their hardware. The commands I wrote above worked for me to install node 12.8.3 on a Raspberry Pi Zero W

@CaptainCodex

This comment has been minimized.

Copy link

@CaptainCodex CaptainCodex commented Aug 30, 2020

Verified (12.8.3) working on Zero W arm6l.

@Natsurii

This comment has been minimized.

Copy link

@Natsurii Natsurii commented Sep 4, 2020

Verified and still working v14.9.0 (armv6l binary) on Zero W

@MarkusBansky

This comment has been minimized.

Copy link

@MarkusBansky MarkusBansky commented Sep 8, 2020

I have used wget https://unofficial-builds.nodejs.org/download/release/v14.10.0/node-v14.10.0-linux-armv6l.tar.gz for the latest node-js version to install it on my Raspberry Pi Zero W and it worked like a charm!

@astarrett

This comment has been minimized.

Copy link

@astarrett astarrett commented Sep 21, 2020

I now have node-v12.15.0-linux-armv6l downloaded to my Raspberry Pi Zero W as per these instructions. Now I get the error: 'You need to run "nvm install v12.15.0" to install before using it.'
I am completely new at this and learning as I go. When I try to run nvm install it looks at the nodejs source and not the local source. Any guidance would be greatly appreciated.

@dkossman

This comment has been minimized.

Copy link

@dkossman dkossman commented Sep 27, 2020

FYI I was able to get 14.10.0 running on a Pi Zero W running Raspbian Buster. Sounds like the newer versions of nodejs won't run on older versions of Raspbian.

@sa1d

This comment has been minimized.

Copy link

@sa1d sa1d commented Nov 22, 2020

Per @dkossman 's comment, you can use that repository with nvm to easily manage installed nodejs versions.
First you need to set repo variable with export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release
Then, you can run nvm ls-remote to see available versions and nvm install v15.2.1 to install nodejs version 15.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.