报错内容
npm ERR! Linux 4.1.19-boot2docker
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "update" "-g"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/glob
npm ERR! code EXDEV
npm ERR! errno -18
npm ERR! syscall rename
npm ERR! EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/npm/node_modules/glob' -> '/usr/local/lib/node_modules/npm/node_modules/.glob.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/npm-debug.log
npm ERR! code 1
解决方案:使用 curl 安装
curl -L https://npmjs.org/install.sh | sh