Use the commands below to install node in the Raspberry Pi Zero.
They are re-runnable so you can upgrade or downgrade just by running the command for each version.
As of Node v12, the Node.js project has stopped supporting the Raspberry Pi Zero's ARM v6 chip and is now classing it as "Experimental", so you can no longer download a tarball binary directly from the main project. The install scripts here are using the Unofficial Builds Project (run by the same team).
"Experimental" status for Node.js is defined as:
Experimental: May not compile or test suite may not pass. The core team does not create releases for these platforms. Test failures on experimental platforms do not block releases. Contributions to improve support for these platforms are welcome.
For more info:
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v4.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v4.4.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v4.7.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v4.8.7.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v5.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v5.12.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.4.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.9.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.11.3.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.13.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v7.2.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v7.7.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.4.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.5.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.6.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.7.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.8.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.8.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.9.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.10.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v8.17.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v9.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v9.5.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v9.8.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v9.11.2.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v10.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v10.6.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v10.15.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v10.24.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v11.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v11.5.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v11.15.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v12.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v12.7.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v12.13.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v12.21.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v12.22.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v13.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v13.6.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v13.14.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.5.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.10.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.15.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.16.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v14.17.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v15.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v15.6.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v15.11.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v15.14.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v16.1.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v16.3.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v16.11.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v16.20.2.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v17.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v17.9.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v18.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v18.10.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v18.19.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v19.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v19.9.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v20.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v20.8.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v20.11.1.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v21.0.0.sh | bash
$ wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v21.6.2.sh | bash
Add the following to the end of your ~/.profile
file:
# Add support for node CLI tools
export PATH=$PATH:/opt/nodejs/bin
And remember, friends dont let friends pipe to sh.