NVM & Node.js - Recommended install for all users

后端 未结 6 1793

is there a recommended install for nvm so all users can use it? i cannot find anything on the web regarding this.

this is what i did

  • installed nvm in a
6条回答
  •  忘掉有多难
    2020-12-07 10:29

    1. Login as root: sudo -s
    2. Install nvm: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | NVM_DIR=/usr/local/nvm bash
    3. Created a file called nvm.sh in /etc/profile.d with the following contents: #!/usr/bin/env bash export NVM_DIR="/usr/local/nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
    4. Run /etc/profile.d/nvm.sh
    5. Install node: nvm install node
    6. Optionally update npm with: npm install -g npm

提交回复
热议问题