Nvm: Unable to install and don't want to use sudo

Created on 7 May 2016  Â·  2Comments  Â·  Source: nvm-sh/nvm

$ 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?

Most helpful comment

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.

All 2 comments

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 ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielepolencic picture danielepolencic  Â·  4Comments

swateek picture swateek  Â·  3Comments

tongxiaofeng picture tongxiaofeng  Â·  5Comments

goalidea picture goalidea  Â·  3Comments

markedcahinde picture markedcahinde  Â·  5Comments