npm在arm上安装sqlite3错误

时间:2017-02-28 20:10:30

标签: node.js linux sqlite

我正在尝试安装节点包' sqlite3'在基于Linux的arm处理器上。我尝试安装软件包时遇到错误。但是,如果我尝试在ubuntu上安装相同的软件包,它会通过。

我在arm处理器上使用Linux Kernel 3.14.52-v2.6b2 + g7c83cef。

我用于sqlite3安装的命令是npm install sqlite3。我确实尝试了this链接但没有用。

我收到了不同的错误

root@colibri-imx6:~# npm install sqlite3
-\|-\
> sqlite3@3.1.8 install /home/root/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(undefined): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v14-linux-arm.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@0.12.7 (node-v14 ABI) (falling back to source compile with node-gyp 
make: Entering directory '/home/root/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3150000/sqlite3.c
  TOUCH Release/obj.target/deps/action_before_build.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o
make: cc: Command not found
    deps/sqlite3.target.mk:117: recipe for target 'Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o' failed
make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3150000/sqlite3.o] Error 127
make: Leaving directory '/home/root/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Linux 3.14.52-v2.6b2+g7c83cef
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/h"
gyp ERR! cwd /home/root/node_modules/sqlite3
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallb)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/root/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
node-pre-gyp ERR! System Linux 3.14.52-v2.6b2+g7c83cef
node-pre-gyp ERR! command "node" "/home/root/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/root/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/roo)
npm ERR! Linux 3.14.52-v2.6b2+g7c83cef
npm ERR! argv "node" "/usr/bin/npm" "install" "sqlite3"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! sqlite3@3.1.8 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@3.1.8 install script 'node-pre-gyp install --fallback-to-build'.
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-pre-gyp install --fallback-to-build
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! Please include the following file with any support request:
npm ERR!     /home/root/npm-debug.log
root@colibri-imx6:~# 

我安装了python-compiler,python-modules和现在的gcc来处理cc命令,但没有任何工作。有谁遇到过这个问题?

1 个答案:

答案 0 :(得分:0)

可能是因为你的基于arm的处理器没有与OS捆绑在一起的C编译器(通常是linux的gcc)......

调试日志告诉程序包在编译本机源时失败。

我不能告诉你这是确定的原因,但你应该试试这个方法!