It is strongly recommended to set the environment variable N_PREFIX to install to a user-writable area. For example:
export N_PREFIX=$HOME/local/n