Tutorial: Install NODE.js on your raspberry pi
What you will need
- raspberry pi (quick setup guide here)
Step 1: Determine the version you need for your pi
Run the following command to see which version of arm your pi supports.
- uname -m
Step 2: Download node.js
- Go to the node.js download page
- Find the version you need based on the output from the last command.
- Right click on the version of ARM that you need and choose Copy Link address.
- Now, go back to your pi terminal and type wget, space, then paste the link that you copied
- Next change the last to characters to be gz, instead of xz.
- For example, if you need armv7 it should look like this:
- wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-armv7l.tar.gz
Step 3: Extract the archive and copy to /usr/local
- tar -xzf node-v8.12.0-linux-armv7l.tar.gz
- cd node-v8.12.0-linux-armv7l/
- sudo cp -R * /usr/local/
Step 4: Verify it works!
- node -v
- npm -v
If you see version numbers for node and npm, you are all set!