$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7766 100 7766 0 0 25429 0 --:--:-- --:--:-- --:--:-- 25462
=> Downloading nvm from git to '/usr/local/nvm'
=> mkdir: cannot create directory ‘/usr/local/nvm’: Permission denied
fatal: could not create work tree dir '/usr/local/nvm': Permission denied
bash: line 72: cd: /usr/local/nvm: No such file or directory
bash: line 73: cd: /usr/local/nvm: No such file or directory
=> Source string already in /home/michael-heuberger/.zshrc
=> Close and reopen your terminal to start using nvm
Do I really have to use sudo? Not looking good and it's not mentioned in the readme. Am I doing something wrong here?
You absolutely should never have to use sudo with nvm. Perhaps you have $NVM_DIR set to /usr/local/nvm? If so, unset that and remove all references to it from your shell profile files - then try reinstalling.
@ljharb yep, i figured out i had a horrible mess with environment variables. cleaned them all, all good now. would be good if nvm prints warnings ...
Most helpful comment
You absolutely should never have to use
sudowithnvm. Perhaps you have$NVM_DIRset to/usr/local/nvm? If so, unset that and remove all references to it from your shell profile files - then try reinstalling.