Skip to content

Instantly share code, notes, and snippets.

@rodrigograca31
Created December 7, 2020 18:57
Show Gist options
  • Save rodrigograca31/01e6848c6ec02758690a94c4e272832f to your computer and use it in GitHub Desktop.
Save rodrigograca31/01e6848c6ec02758690a94c4e272832f to your computer and use it in GitHub Desktop.
Latest NodeJS version on Raspberry PI 0
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 ....
@rodrigograca31
Copy link
Author

rodrigograca31 commented Dec 7, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment