tl;dr

# error on install
n install 8.2.1
mkdir: /usr/local/n/versions/node: Permission denied
mkdir: /usr/local/n/versions/io: Permission denied

# create dir before install
sudo mkdir /usr/local/n
sudo chown -R $(whoami) $_

# then success
n install 8.2.1

Ref: GitHub: Permission denied before running with sudo #416

Leave a Reply

Your email address will not be published. Required fields are marked *