Last active
January 2, 2021 14:32
-
-
Save hfase01/3446929 to your computer and use it in GitHub Desktop.
Install nodejs from source
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
#!/bin/sh | |
######### | |
## This script simply installs Nodejs from source, | |
## eliminating the need for strange packaged versions. | |
## | |
## To run this script right from GitHub use the following command. | |
## (You will not see the password prompt at first though..) | |
## | |
## ~$ curl https://gist.githubusercontent.com/hfase01/3446929/raw/node.sh | sudo sh | |
########## | |
set -o verbose | |
HOME='/home/nodejs' | |
VER='v15.5.0' | |
if [ -d "$HOME" ]; then | |
cd $HOME | |
fi | |
if [ ! -d "$HOME" ]; then | |
mkdir -p $HOME && cd $HOME && git clone https://github.com/nodejs/node.git ./ | |
fi | |
git checkout $VER | |
./configure sh | |
make | |
sudo make uninstall | |
./configure sh | |
make | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment