Last active
April 11, 2022 17:17
-
-
Save teuteuguy/66156027a223f193d040e799987982bf to your computer and use it in GitHub Desktop.
NodeJS for Ubuntu/Debian
This file contains hidden or 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
| #!/bin/bash | |
| # Tested for NodeJS 12.18.0 | |
| # Tested on: | |
| # - RPI | |
| # - Jetson Nano | |
| # Run this on your device with sudo | |
| if [ "$EUID" -ne 0 ] | |
| then echo "Please run as root / sudo" | |
| exit | |
| fi | |
| set -e | |
| echo "Downloading version: $1" | |
| ARCH=`uname -m` | |
| cd /tmp | |
| wget https://nodejs.org/dist/v$1/node-v$1-linux-$ARCH.tar.gz | |
| tar -xvf node-v$1-linux-$ARCH.tar.gz | |
| cd node-v$1-linux-$ARCH | |
| cp -R * /usr/local/ | |
| ln -s /usr/local/bin/node /usr/local/bin/nodejs12.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment