Created
December 7, 2020 18:57
-
-
Save rodrigograca31/01e6848c6ec02758690a94c4e272832f to your computer and use it in GitHub Desktop.
Latest NodeJS version on Raspberry PI 0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export NODE_VER=14.15.1 | |
if ! node --version | grep -q ${NODE_VER}; then | |
(cat /proc/cpuinfo | grep -q "Pi Zero") && if [ ! -d node-v${NODE_VER}-linux-armv6l ]; then | |
echo "Installing nodejs ${NODE_VER} for armv6 from unofficial builds..." | |
curl -O https://unofficial-builds.nodejs.org/download/release/v${NODE_VER}/node-v${NODE_VER}-linux-armv6l.tar.xz | |
tar -xf node-v${NODE_VER}-linux-armv6l.tar.xz | |
fi | |
echo "Adding node to the PATH" | |
PATH=$(pwd)/node-v${NODE_VER}-linux-armv6l/bin:${PATH} | |
fi | |
node --version # or whatever .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info here: How to install the latest NodeJS on Raspberry PI 0 W?