2014-01-09 45 views
1

为了解决我的问题,我找不到任何东西,我阅读所有的谷歌,仍然没有生气,没有人有问题安装这个软件包,并可以解决它?我需要帮助。ubuntu虚拟机上的node-expat安装错误

[email protected]:~/Desktop/nodeEjabberd$ npm cache clean 
[email protected]:~/Desktop/nodeEjabberd$ sudo npm install node-expat 
npm http GET https://registry.npmjs.org/node-expat 
npm http 200 https://registry.npmjs.org/node-expat 
npm http GET https://registry.npmjs.org/node-expat/-/node-expat-2.1.4.tgz 
npm http 200 https://registry.npmjs.org/node-expat/-/node-expat-2.1.4.tgz 
npm http GET https://registry.npmjs.org/nan 
npm http 200 https://registry.npmjs.org/nan 
npm http GET https://registry.npmjs.org/nan/-/nan-0.6.0.tgz 
npm http 200 https://registry.npmjs.org/nan/-/nan-0.6.0.tgz 

> [email protected] install /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat 
> node-gyp rebuild 

gyp: /home/ubuntu/.node-gyp/0.10.24/common.gypi not found (cwd: /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat) while reading includes of binding.gyp 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:789:12) 
gyp ERR! System Linux 3.5.0-45-generic 
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/ubuntu/Desktop/nodeEjabberd/node_modules/node-expat 
gyp ERR! node -v v0.10.24 
gyp ERR! node-gyp -v v0.12.1 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the node-expat package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls node-expat 
npm ERR! There is likely additional logging output above. 

npm ERR! System Linux 3.5.0-45-generic 
npm ERR! command "node" "/usr/bin/npm" "install" "node-expat" 
npm ERR! cwd /home/ubuntu/Desktop/nodeEjabberd 
npm ERR! node -v v0.10.24 
npm ERR! npm -v 1.3.23 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/ubuntu/Desktop/nodeEjabberd/npm-debug.log 
npm ERR! not ok code 0 
+1

你尝试删除'.node-gyp'目录吗? – vinayr

+0

我在哪里可以找到该目录? – taxicala

+0

'/ home/ubuntu/.node-gyp' – vinayr

回答

2

'.node-gyp/0.10.24/common.gypi not found'表明,出事了,当node-gyp尝试安装0.10.24的NodeJS的头。

删除/home/ubuntu/.node-gyp目录并重试。

+0

感谢您的,像魅力一样工作! :) – taxicala

相关问题