简体   繁体   中英

Installation nvm in Ubuntu 14.04

I have to install nvm on Ubuntu 14.04 for a work and this is the guide that I have to follow:

Installation of nvm globally

  1. sudo git clone https://github.com/creationix/nvm.git /opt/nvm
  2. sudo mkdir /usr/local/nvm
  3. sudo addgroup -system dev
  4. sudo chown -R root:dev /usr/local/nvm
  5. sudo chmod -R 775 /usr/local/nvm
  6. sudo vim /etc/profile.d/nvm.sh

Installation of node v 4.x

  1. sudo mkdir /usr/local/node
  2. sudo chown -R root:dev /usr/local/node
  3. sudo chmod -R 775 /usr/local/node
  4. nvm stable

The problems are that in the passage 6 I don't know exactly what to do or write in the file nvm.sh and then the last command tells me "nvm: command not found"

you should add to nvm.sh the following content:

export NVM_DIR=/usr/local/nvm
source /opt/nvm/nvm.sh

export NPM_CONFIG_PREFIX=/usr/local/node
export PATH="/usr/local/node/bin:$PATH"

refer also to this answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM