我试图安装npm install jquery,但当试图安装它的一个依赖项Contextify时,它失败了。所以我尝试npm install contextify并得到了这个错误。在上网大约一个小时后,我还没有找到解决办法。我一直靠得很近,但还不够近。我的node.js运行在Ubuntu12.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任何帮助都是非常感谢的。:)
更新
我读过,如果python没有安装,或者没有安装gcc编译器,就会出现问题。我已经把它们都安装好了。我遵循gcc编译器的这些说明,python2.7提供了Ubuntu12.04。所以我还在研究。:)
发布于 2013-03-16 19:22:39
你试过npm install --verbose contextify 2>&1 | grep gyp了吗?它将为您提供关于故障的详细输出。
发布于 2013-10-03 21:15:42
我知道您提到过python已经安装了,但是这个路径呢?
如果这没有帮助:首先,请详细说明一下您在这台机器上安装node.js的方式吗?其次,为什么不使用这样一个更新版本的node.js呢?
https://stackoverflow.com/questions/12699330
复制相似问题