error while “npm -g install sqlite3” - freebsd-8.3-x86
发布于 12 年前 作者 nodejszzl 7424 次浏览 最后一次编辑是 9 年前

大家好,

我要在freebsd-8.3-x86跑一个nodejs 项目, 在我安装sqlite3 (“npm -g install sqlite3”)的时候报错 .

请大家帮忙看下如何处理呢?

npm-debug.log 如下:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', '-g', 'install', 'sqlite3' ]
2 info using npm[@1](/user/1).1.68
3 info using node[@v0](/user/v0).8.17
4 verbose read json /usr/local/lib/package.json
5 verbose read json /usr/local/lib/package.json
6 verbose cache add [ 'sqlite3', null ]
.....
.....
21 http GET https://registry.npmjs.org/sqlite3
22 http 200 https://registry.npmjs.org/sqlite3
.....
.....
35 http GET https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.5.tgz
36 http 200 https://registry.npmjs.org/sqlite3/-/sqlite3-2.1.5.tgz
.....
.....
448 info install sqlite3[@2](/user/2).1.5
449 verbose unsafe-perm in lifecycle false
450 verbose set uid from=0 to=nobody
451 silly exec sh "-c" "node-gyp rebuild"
452 silly sh,-c,node-gyp rebuild,/usr/local/lib/node_modules/sqlite3 spawning
453 info sqlite3[@2](/user/2).1.5 Failed to exec install script
454 info /usr/local/lib/node_modules/sqlite3 unbuild
455 verbose from cache /usr/local/lib/node_modules/sqlite3/package.json
456 info preuninstall sqlite3[@2](/user/2).1.5
457 info uninstall sqlite3[@2](/user/2).1.5
458 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild sqlite3[@2](/user/2).1.5
459 info postuninstall sqlite3[@2](/user/2).1.5
460 error sqlite3[@2](/user/2).1.5 install: `node-gyp rebuild`
460 error `sh "-c" "node-gyp rebuild"` failed with 126
461 error Failed at the sqlite3[@2](/user/2).1.5 install script.
461 error This is most likely a problem with the sqlite3 package,
461 error not with npm itself.
461 error Tell the author that this fails on your system:
461 error     node-gyp rebuild
461 error You can get their info via:
461 error     npm owner ls sqlite3
461 error There is likely additional logging output above.
462 error System FreeBSD 8.3-RELEASE
463 error command "node" "/usr/local/bin/npm" "-g" "install" "sqlite3"
464 error cwd /root
465 error node -v v0.8.17
466 error npm -v 1.1.68
467 error code ELIFECYCLE
468 verbose exit [ 1, true ]
3 回复
460 error sqlite3@2.1.5 install: `node-gyp rebuild`
460 error `sh "-c" "node-gyp rebuild"` failed with 126
461 error Failed at the sqlite3@2.1.5 install script.
461 error This is most likely a problem with the sqlite3 package,
461 error not with npm itself.
461 error Tell the author that this fails on your system:
461 error     node-gyp rebuild
461 error You can get their info via:
461 error     npm owner ls sqlite3
461 error There is likely additional logging output above.
462 error System FreeBSD 8.3-RELEASE
463 error command "node" "/usr/local/bin/npm" "-g" "install" "sqlite3"
464 error cwd /root
465 error node -v v0.8.17
466 error npm -v 1.1.68
npm install node-gyp -g

先执行这个试试看。

成功! 非常感谢

回到顶部