ubuntu VM 上的 node-expat 安装错误 [英] node-expat install error on ubuntu VM

查看:47
本文介绍了ubuntu VM 上的 node-expat 安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有找到任何东西来解决我的问题,我阅读了所有谷歌但仍然没有答案,有没有人在安装这个包时遇到问题并且可以解决它?我需要这方面的帮助.

I could not find anything yet in order to solve my issues, ive read all google and still no anwer, did anyone had issues installing this package and could solve it? I need help with this.

ubuntu@ubuntu:~/Desktop/nodeEjabberd$ npm cache clean
ubuntu@ubuntu:~/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

> node-expat@2.1.4 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! node-expat@2.1.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-expat@2.1.4 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

推荐答案

'.node-gyp/0.10.24/common.gypi not found' 提示 node 出现问题-gyp 尝试安装 nodejs 0.10.24 的头文件.

'.node-gyp/0.10.24/common.gypi not found' suggests that something went wrong when node-gyp tried to install headers of nodejs 0.10.24.

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

这篇关于ubuntu VM 上的 node-expat 安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆