Contextify@0.1.3安装:`node-gyp rebuild`失败1

我试图npm install jquery ,它试图安装它的依赖关系之一,Contextify失败。 所以我试图npm install contextify并得到这个错误。 大约一个小时左右的在线观看后,我一直无法find解决scheme。 我一直靠近,但不够近。 我的node.js运行在Ubuntu 12.04上,正如你在代码中看到的,node.js是0.8.11版本。 这里是尝试npm install jquery时的错误:

 gyp http GET http://nodejs.org/dist/v0.8.11/node-v0.8.11.tar.gz gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: socket hang up gyp ERR! stack at createHangUpError (http.js:1263:15) gyp ERR! stack at Socket.socketOnEnd (http.js:1351:23) gyp ERR! stack at TCP.onread (net.js:418:26) gyp ERR! System Linux 3.2.0-23-generic gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /opt/www/novacruisers/node_modules/jquery/node_modules/jsdom/node_modules/contextify gyp ERR! node -v v0.8.11 gyp ERR! node-gyp -v v0.6.11 gyp ERR! not ok npm WARN optional dep failed, continuing contextify@0.1.3 

npm install contextify的错误问题是:

 npm ERR! contextify@0.1.3 install: `node-gyp rebuild` npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1 

任何帮助是极大的赞赏。 🙂

UPDATE

我已经读过,如果没有安装python,或者如果没有安装gcc编译器,就会出现问题。 我有这两个安装。 我遵循这些gcc编译器的说明 ,python 2.7自带的Ubuntu 12.04。 所以我还在研究。 🙂

你试过npm install --verbose contextify 2>&1 | grep gyp npm install --verbose contextify 2>&1 | grep gyp ? 它应该给你详细的输出失败。

我知道你提到python被安装,但是这个python_path呢

如果这没有帮助:首先,你可以详细说明你在这台机器上安装node.js的方式吗? 其次,为什么不使用这样一个更新版本的node.js?