npm install sqlite3 安装报错如下: npm http GET https://registry.npmjs.org/sqlite3 npm http 304 https://registry.npmjs.org/sqlite3
sqlite3@2.1.4 install D:\DevTools\nodejs\5146OS_Code\bookcode\chap06\node_modu les\sqlite3 node-gyp rebuild
D:\DevTools\nodejs\5146OS_Code\bookcode\chap06\node_modules\sqlite3>node “C:\Pro
gram Files\nodejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp
\bin\node-gyp.js” rebuild
info it worked if it ends with ok
ERR! Error: Can’t find Python, you can set the PYTHON env variable.
at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-
gyp\lib\configure.js:69:14)
at Object.oncomplete (C:\Program Files\nodejs\node_modules\npm\node_modules
node-gyp\lib\configure.js:57:11)
ERR! not ok
npm ERR! sqlite3@2.1.4 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild"
failed with 1
npm ERR!
npm ERR! Failed at the sqlite3@2.1.4 install script.
npm ERR! This is most likely a problem with the sqlite3 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 sqlite3
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command “C:\Program Files\nodejs\\node.exe” “C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js” “install” “sqlite3”
npm ERR! cwd D:\DevTools\nodejs\5146OS_Code\bookcode\chap06
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code ELIFECYCLE
npm ERR! message sqlite3@2.1.4 install: node-gyp rebuild
npm ERR! message cmd "/c" "node-gyp rebuild"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\DevTools\nodejs\5146OS_Code\bookcode\chap06\npm-debug.log
npm not ok
… https://github.com/developmentseed/node-sqlite3/issues/106
有个老外编译好了(看评论),注意:node 版本 ,v0.10.x 以上才能用…