nvm install v7.4.0, it will using the cache binary file, output the following msg
Downloading and installing node v7.4.0...
Local cache found: $NVM_DIR/.cache/bin/node-v7.4.0-darwin-x64/node-v7.4.0-darwin-x64.tar.gz
Checksums match! Using existing downloaded archive $NVM_DIR/.cache/bin/node-v7.4.0-darwin-x64/node-v7.4.0-darwin-x64.tar.gz
Now using node v7.4.0 (npm v4.0.5)
再试一次
检查网络,再试
重启再试
nvm install v7.4.0
的时候经常性的由于网络(GFW)的原因,现在binary
的时候下载到一半突然断了,然后需要download source
,重新compile
,最终很容易造成失败所以决定用迅雷或者其他下载工具,下载包,放到nvm的
cache
目录里面,最后用nvm install
命令,免去了终端下载中断之后从源码重试的尴尬,具体步骤如下下载包
https://nodejs.org/dist/v7.4.0/node-v7.4.0-darwin-x64.tar.gz
,直接粘贴到迅雷里面就可以下载了cd ~/.nvm/.cache/bin/
mkdir node-v7.4.0-darwin-x64
the prefix of file you downloadedmv ~/Downloads/node-v7.4.0-darwin-x64.tar.gz ~/.nvm/.cache/bin/node-v7.4.0-darwin-x64
, 使用自己下载的文件的存放路径替换上面的~/Downloads/node-v7.4.0-darwin-x64.tar.gz
nvm install v7.4.0
, it will using the cache binary file, output the following msg