[email protected]:~/express$ npm install -g node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm http 200 https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm http 200 https://registry.npmjs.org/node-gyp/-/node-gyp-0.6.3.tgz
npm ERR! Could not create /usr/local/lib/node_modules/___node-gyp.npm
npm ERR! error installing [email protected]
npm ERR! Error: EACCES, permission denied '/usr/local/lib/node_modules'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "node-gyp"
npm ERR! cwd /home/user/express
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! message EACCES, permission denied '/usr/local/lib/node_modules'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/user/express/npm-debug.log
npm not ok
[email protected]:~/express$
我在试图在系统上安装Node-gyp。我试图安装在具有Linux 12.04 ubuntu OS的系统上。如何在Linux中安装node-gyp?
有人知道如何设置安装node-gyp的权限。
感谢您的帮助。
+5
尝试“sudo npm install -g node-gyp” –
2012-08-10 05:34:18
+0
@nguyenkha感谢它的工作。 –
2012-08-10 05:36:52
+0
更好地以root身份登录并执行操作;如果在sudo下运行,最新版本的npm将切换为“nobody”,偶尔会导致问题。 –
2012-08-10 05:38:41