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