git clone https://github.com/tj/n.git
cd n
# install it to a home folder instead of /usr/local
PREFIX=$HOME/local make install
Update the paths
vim ~/.zshrc # or ~/.bashrc or whatever you use
export NPM_CONFIG_PREFIX="$HOME/local" # npm config get prefix # https://docs.npmjs.com/getting-started/fixing-npm-permissions
export N_PREFIX="$NPM_CONFIG_PREFIX" # for n versions
export PATH="$PATH:$NPM_CONFIG_PREFIX/bin"
n stable
Now you have the latest stable version of node in $N_PREFIX/bin/node