It is strongly recommended to set the environment variable N_PREFIX to install to a user-writable area. For example:

N_PREFIX=$HOME/local/n

By default, nodejs only provides official builds for glibc. For musl and other unofficially supported architectures, set the variable like so:

N_NODE_DOWNLOAD_MIRROR=https://unofficial-builds.nodejs.org/download/release
