2012-07-11 66 views
2

我似乎無法在Windows7上加載節點弱點。我已經試過Python 2.7,2.5,2.3,無濟於事。看起來(從下面的錯誤),我需要使用Python2的版本,但改變版本似乎沒有幫助。任何幫助表示讚賞。在Windows7上安裝節點弱點時出錯

C:\project1\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\ 
bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
gyp ERR! rebuild error Error: Python executable "c:\Python25\python.exe" is Pyth 
on 3, which is not supported. 

gyp ERR! rebuild error  at failPython3 (C:\Program Files (x86)\nodejs\node_mo 
dules\npm\node_modules\node-gyp\lib\configure.js:90:14) 
gyp ERR! rebuild error  at C:\Program Files (x86)\nodejs\node_modules\npm\nod 
e_modules\node-gyp\lib\configure.js:79:9 
gyp ERR! rebuild error  at ChildProcess.exithandler (child_process.js:534:7) 
gyp ERR! rebuild error  at ChildProcess.EventEmitter.emit (events.js:91:17) 
gyp ERR! rebuild error  at maybeClose (child_process.js:634:16) 
gyp ERR! rebuild error  at Process._handle.onexit (child_process.js:676:5) 
gyp ERR! not ok 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the weak 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 weak 
npm ERR! There is likely additional logging output above. 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak" 
npm ERR! cwd C:\project1 
npm ERR! node -v v0.8.1 
npm ERR! npm -v 1.1.33 
npm ERR! code ELIFECYCLE 
npm ERR! message [email protected] install: `node-gyp rebuild` 
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\project1\npm-debug.log 
npm ERR! not ok code 0 

回答

2

顯然[email protected]有哪裏會不正確地解析了Python版本號的錯誤,而是固定在036a730f4a3a95e65d8f390f7f5c4f0d3321e422(0.5.3)。爲了解決這個問題,我不得不更新node-gyp:

cd "C:\Program Files (x86)\nodejs" 
npm install node-gyp 

簡單的解決方案,但一個難以追查的問題。

0

我在Windows 7主機對對Linux Mint的虛擬盒類似的問題。我通過apt-get購買的nodejs(v0.6.19)和npm(v1.1.14)libs已過時。我通過here的源代碼安裝了npm(v1.3.11)和nodejs(v0.10.20)。

我爲符號鏈接創建的共享文件夾中禁用共享文件夾中的編譯代碼時遇到的錯誤。所以,我提取了zip文件,編譯並將這些文件安裝在共享文件夾之外。這直接解決了問題。