Ubuntu 16.04.3 安装nvm

最近给一批执行机安装node环境,记录下过程

安装nvm

test1234@test1234:~$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
=> nvm is already installed in /home/test1234/.nvm, trying to update using git
=> error: pathspec 'v0.33.0' did not match any file(s) known to git.
=> Compressing and cleaning up git repository
对象计数中: 2869, 完成.
Delta compression using up to 4 threads.
压缩对象中: 100% (2838/2838), 完成.
写入对象中: 100% (2869/2869), 完成.
Total 2869 (delta 1648), reused 1160 (delta 0)

=> nvm source string already in /home/test1234/.bashrc
=> bash_completion source string already in /home/test1234/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

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

使环境变量生效

test1234@test1234:~$ source .bashrc

安装node

test1234@test1234:~$ nvm install 4.2.4
v4.2.4 is already installed.
Now using node v4.2.4 (npm v2.14.12)

猜你喜欢

转载自blog.csdn.net/a19891024/article/details/80252122