简体   繁体   English

在 Yocto 的节点上安装 sqlite3 显示错误 node-pre-gyp ERR: stack Error: Failed to execute '/usr/local/bin/node

[英]Installing sqlite3 on node in Yocto showing Error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node

**Installing sqlite3 in node application on node application in Yocto os it allowed to install in **在 Yocto 操作系统中的节点应用程序中安装 sqlite3,它允许安装在

node v14.15.5 SQLite3 v3.22.0节点 v14.15.5 SQLite3 v3.22.0

But it was showing error on updated versions.但它在更新版本上显示错误。

As of now the latest node and sqlite3 version is截至目前,最新的节点和 sqlite3 版本是

node v15.x节点 v15.x

sqlite v3.34 sqlite v3.34

On this version it was unable to install sqlite3 in node application package and throwing below error Though sqlite3 with v3.34.x was installed in Yocto.在此版本上,它无法在节点应用程序 package 中安装 sqlite3 并抛出以下错误尽管在 Yocto 中安装了带有 v3.34.x 的 sqlite3。

verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install', 'sqlite3' ]   error node-pre-gyp info it worked if it ends with ok 

error node-pre-gyp info using node-pre-gyp@0.11.0 

error node-pre-gyp info using node@15.8.0 | linux | arm 

error node-pre-gyp WARN Using request for node-pre-gyp https download 

error node-pre-gyp info check checked for "/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/lib/binding/napi-v3-linux-arm/node_sqlite3.node" (not found) 

error node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm.tar.gz error node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm.tar.gz


error node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm.tar.gz error node-pre-gyp WARN Pre-built binaries not found for sqlite3@5.0.2 and node@15.8.0 (node-v88 ABI, unknown) (falling back to source compile with node-gyp) 

error node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm.tar.gz


error gyp info it worked if it ends with ok error gyp info using node-gyp@7.1.2 

error gyp info using node@15.8.0 | linux | arm error gyp info ok 

error gyp info it worked if it ends with ok error gyp info using node-gyp@7.1.2 

error gyp info using node@15.8.0 | linux | arm 

error gyp info find Python using Python version 3.5.3 found at "/usr/bin/python3" 

error gyp info spawn /usr/bin/python3 error gyp info spawn args [ 

error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', error gyp info spawn args 'binding.gyp', 

error gyp info spawn args '-f', 

error gyp info spawn args 'make', error gyp info spawn args '-I', error gyp info spawn args '/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/build/config.gypi',


error gyp info spawn args '-I', error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', 

error gyp info spawn args '-I', 

error gyp info spawn args '/home/root/.cache/node-gyp/15.8.0/include/node/common.gypi', 

error gyp info spawn args '-Dlibrary=shared_library', 

error gyp info spawn args '-Dvisibility=default', 

error gyp info spawn args '-Dnode_root_dir=/home/root/.cache/node-gyp/15.8.0', 

error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp', 

error gyp info spawn args '-Dnode_lib_file=/home/root/.cache/node-gyp/15.8.0/<(target_arch)/node.lib',


error gyp info spawn args '-Dmodule_root_dir=/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3', 

error gyp info spawn args '-Dnode_engine=v8', 

error gyp info spawn args '--depth=.', error gyp info spawn args '--no-parallel', 

error gyp info spawn args '--generator-output', 

error gyp info spawn args 'build', error gyp info spawn args '-Goutput_dir=.' 

error gyp info spawn args ] error gyp info ok error gyp info it worked if it ends with ok error gyp info using node-gyp@7.1.2 error gyp info using node@15.8.0 | linux | arm 

error gyp info spawn make error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] error Traceback (most recent call last): error File "./extract.py", line 2, in <module> 

error import tarfile error ImportError: No module named tarfile error make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3340000/sqlite3.c] Error 1 

error gyp ERR! build error error gyp ERR! stack Error: `make` failed with exit code: 2 

error gyp ERR! stack at ChildProcess.onExit/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)


error gyp ERR! stack at ChildProcess.emit (node:events:378:20) 

error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) 

error gyp ERR! System Linux 4.9.88-Agriscan-6.0.0+g9512b3d 

error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/lib/binding/napi-v3-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/lib/binding/napi-v3-linux-arm" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" 

error gyp ERR! cwd /home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3 

error gyp ERR! node -v v15.8.0 

error gyp ERR! node-gyp -v v7.1.2 

error gyp ERR! not ok 

error node-pre-gyp ERR! build error 

error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build
--module=/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/lib/binding/napi-v3-linux-arm/node_sqlite3.node
--module_name=node_sqlite3 --module_path=/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/lib/binding/napi-v3-linux-arm
--napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1) 

error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)


error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:378:20) 

error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16) 

error node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) 

error node-pre-gyp ERR! System Linux 4.9.88-Agriscan-6.0.0+g9512b3d 

error node-pre-gyp ERR! command "/usr/local/bin/node" "/home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" 

error node-pre-gyp ERR! cwd /home/root/Livestock-Recording-System/Agriscan/node_modules/sqlite3 

error node-pre-gyp ERR! node -v v15.8.0 

error node-pre-gyp ERR! node-pre-gyp -v v0.11.0 

error node-pre-gyp ERR! not ok verbose exit 1

You have to first check if gcc is available or not with this given command gcc --version您必须首先使用给定的命令gcc --version检查 gcc 是否可用

If not available than install it with given command bitbake meta-toolchain如果不可用,则使用给定的命令bitbake meta-toolchain安装它

After that remove node_modules by rm -rf node_modules之后通过rm -rf node_modules 删除 node_modules

Install npm globally全局安装npm

Remove package-lock.json file删除package-lock.json文件

Now install sqlite3 from source with this command npm install --build-from-source --sqlite=/usr/local/opt/sqlite/ will allow you to install sqlite3 on Yocto.现在使用此命令从源代码安装 sqlite3 npm install --build-from-source --sqlite=/usr/local/opt/sqlite/将允许您在 Yocto 上安装 sqlite3。

Reference Link: https://www.npmjs.com/package/sqlite3参考链接: https://www.npmjs.com/package/sqlite3

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 节点预gyp ERR! 堆栈错误:无法执行&#39;/usr/local/bin/node /usr/local/lib/node_modules - node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules 安装 sqlite3 时 node-pre-gyp 出错 - Error with node-pre-gyp when installing sqlite3 如何修复 npm install node-pre-gyp ERR 错误 - How to fix the npm install node-pre-gyp ERR error bcrypt npm 安装错误 - 错误:找不到模块 node-pre-gyp\bin\node-pre-gyp - bcrypt npm install error - Error: Cannot find module node-pre-gyp\bin\node-pre-gyp 节点预gyp ERR! 不行 | React Native 中的 node-gyp 错误 - macOS - node-pre-gyp ERR! not ok | node-gyp Error in React native - macOS NPM 安装错误 - 节点预 Gyp - NPM Install Error - Node-Pre-Gyp Webpack:ERROR in ./~/sqlite3/~/node-pre-gyp/lib/node-pre-gyp.js找不到模块:错误:无法解析&#39;file&#39;或&#39;directory&#39;../package - Webpack: ERROR in ./~/sqlite3/~/node-pre-gyp/lib/node-pre-gyp.js Module not found: Error: Cannot resolve 'file' or 'directory' ../package 通过npm安装Realm时出错:npm ERR! 在realm@1.2.0安装脚本&#39;node-pre-gyp install --fallback-to-build&#39;失败 - Error installing Realm via npm: npm ERR! Failed at the realm@1.2.0 install script 'node-pre-gyp install --fallback-to-build' 节点预gyp ERR! 和gyp ERR! 处理? - node-pre-gyp ERR! and gyp ERR! handling? 由于与节点可能发生冲突,导致节点预gyp安装错误 - node-pre-gyp install error due to possible conflict with node
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM