MAC 用nvm安裝node出錯解決方法

使用終端輸入node

$ nvm install v6.9.5ui

 

Downloading and installing node v6.9.5...spa

sed: 1: "s#/usr/local/opt/nvmit

Sa ...": unterminated substitute patternclass

Local cache found: thread

Computing checksum with shasum -a 256ejs

Checksums do not match: '\96d80603fcd74ce2cc261d980d4f06b6ec10432b446ab13359c8ad7f631991e8' found, '96d80603fcd74ce2cc261d980d4f06b6ec10432b446ab13359c8ad7f631991e8' expected.sed

Checksum check failed!方法

Removing the broken local cache...nvm

Downloading https://nodejs.org/dist/v6.9.5/node-v6.9.5-darwin-x64.tar.gz...

######################################################################## 100.0%

Computing checksum with shasum -a 256

Checksums do not match: '\96d80603fcd74ce2cc261d980d4f06b6ec10432b446ab13359c8ad7f631991e8' found, '96d80603fcd74ce2cc261d980d4f06b6ec10432b446ab13359c8ad7f631991e8' expected.

Binary download failed, trying source.

Detected that you have 4 CPU core(s)

Running with 3 threads to speed up the build

sed: 1: "s#/usr/local/opt/nvm

Sa ...": unterminated substitute pattern

Local cache found: 

Computing checksum with shasum -a 256

Checksums do not match: '\f7e9ab702c5d1f5a3521199c04cc670fda3cf4b0e48548b09ac7ac874ccb504a' found, 'f7e9ab702c5d1f5a3521199c04cc670fda3cf4b0e48548b09ac7ac874ccb504a' expected.

Checksum check failed!

Removing the broken local cache...

Downloading https://nodejs.org/dist/v6.9.5/node-v6.9.5.tar.gz...

######################################################################## 100.0%

Computing checksum with shasum -a 256

Checksums do not match: '\f7e9ab702c5d1f5a3521199c04cc670fda3cf4b0e48548b09ac7ac874ccb504a' found, 'f7e9ab702c5d1f5a3521199c04cc670fda3cf4b0e48548b09ac7ac874ccb504a' expected.

nvm: install v6.9.5 failed!

 

解法方法:

終端輸入如下指令即可

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
相關文章
相關標籤/搜索