[email protected]安装:`node-gyp rebuild`失败1
问题描述:
我尝试登录npm install jquery
,试图安装其中一个依赖项Contextify时失败。所以我试图npm install contextify
并得到这个错误。在线观看大约一个小时左右后,我一直无法找到解决方案。我一直在靠近但不够近。我的node.js在Ubuntu 12.04上运行,正如你在我的代码中看到的,node.js的版本是0.8.11。这里是试图npm install jquery
时出现错误:[email protected]安装:`node-gyp rebuild`失败1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
任何帮助是极大的赞赏:
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 [email protected]
而对于npm install contextify
错误。 :)
UPDATE
我读过,如果没有安装蟒蛇来,或者如果没有安装gcc编译器的问题。我有这两个安装。我跟着these instructions for the gcc compiler,python 2.7自带了Ubuntu 12.04。所以我还在研究。 :)
答
你试过npm install --verbose contextify 2>&1 | grep gyp
?它应该给你详细的输出失败。
你可能有同样的问题,因为这: http://stackoverflow.com/questions/9382868/unable-to-install-jquery-with-node-js-unable-to-load-contextify –