我嘗試登錄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。所以我還在研究。 :)
你可能有同樣的問題,因爲這: http://stackoverflow.com/questions/9382868/unable-to-install-jquery-with-node-js-unable-to-load-contextify –