How to install NVM under MAC OS x

Source: Internet
Author: User
Tags install node

Recently you're ready to learn about node. js and get some video on YouTube to go home. As a result, the installation of NVM on Ubuntu is OK, pit cargo mac.

After a constant attempt, google,youtube, finally found how to fix. We will record the steps, consolation.

Installing node. JS was supposed to take four steps (if you don't make a version switch, the official installs you with a dummy installation):

1. Install git

Install git First sudo Install git

2. Install Curl

# Install Curlsudo apt-get Install Curl

3. Install NVM

# Install nvmcurl-o-https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash# install NVM on mac# already installed Xcode??????? On my Macsudo curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | Bash

After performing the Curl command on Ubuntu, restarting the terminal is possible with NVM, but it also needs to be done on the Mac:

A. First make sure that the configuration directory does not exist-I didn't start on my Mac

shaofans-mac:~ fan$ ~/.bashrc-bash:/users/fan/.bashrc:no such file or DIRECTORY#~/.BASHRC, ~/.bash_profile, ~/.ZSHRC, a nd ~/.profile. All try to

B. Create a. profile file without a catalog, as follows (there will be this after curl, copy here):

Export nvm_dir= "/USERS/FAN/.NVM" [-S "$NVM _dir/nvm.sh"] &&. "$NVM _dir/nvm.sh"  # this loads NVM

C. Put the file in the/users/fan/directory, restart terminal, all OK

4. Install node and set node version

# Install node NVM install 0.10# set version to being DEFAULTNVM alias default 0.10# Select version NVM use 0.10

How to install NVM under MAC OS x

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.