$ npm install -g sumeru npm http GET https://registry.npmjs.org/sumeru npm http 200 https://registry.npmjs.org/sumeru npm http GET https://registry.npmjs.org/sumeru/-/sumeru-0.8.1.tgz npm http 200 https://registry.npmjs.org/sumeru/-/sumeru-0.8.1.tgz npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/sumeru’ npm ERR! { [Error: EACCES, mkdir ‘/usr/local/lib/node_modules/sumeru’] npm ERR! errno: 3, npm ERR! code: ‘EACCES’, npm ERR! path: ‘/usr/local/lib/node_modules/sumeru’, npm ERR! fstream_type: ‘Directory’, npm ERR! fstream_path: ‘/usr/local/lib/node_modules/sumeru’, npm ERR! fstream_class: ‘DirWriter’, npm ERR! fstream_stack: npm ERR! [ ‘/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23’, npm ERR! ‘/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53’, npm ERR! ‘Object.oncomplete (fs.js:107:15)’ ] } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.4.0 npm ERR! command “node” “/usr/local/bin/npm” “install” “-g” "sumeru" npm ERR! cwd /Volumes/Data/nodeworkspace/cloudaApp npm ERR! node -v v0.10.17 npm ERR! npm -v 1.3.8 npm ERR! path /usr/local/lib/node_modules/sumeru npm ERR! fstream_path /usr/local/lib/node_modules/sumeru npm ERR! fstream_type Directory npm ERR! fstream_class DirWriter npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/sumeru’ npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23 npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /Volumes/Data/nodeworkspace/cloudaApp/npm-debug.log npm ERR! not ok code 0
这不是提示得很明确吗?你得以超级用户的身份执行安装命令。
$ sudo npm install -g sumeru
不好意思,以前一直用windows系统,对unix命令不熟。 按照你的提示,问题解决了,谢谢!