iain-g
iain-g

Reputation: 193

nvm install fails to Append nvm source string

I downloaded NVM (on Mac High Sierra), with:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

download works, but then there's an error:

Appending nvm source string to /Users/User/.bashrc
bash: line 353: /Users/User/.bashrc: Permission denied
=> Appending bash_completion source string to /Users/User/.bashrc
bash: line 360: /Users/User/.bashrc: Permission denied

How can I grant it permission - or manually add the strings to .bashrc? And if so what does the string need to be?

Upvotes: 2

Views: 4334

Answers (1)

4ndt3s
4ndt3s

Reputation: 3467

The lines you are looking for are the following:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Append them at final of you .bashrc.

Upvotes: 2

Related Questions