我在pi上运行raspbian,并且当我运行“ npm rebuild”以使安装了npm的node-red节点程序包出现在我的node-red界面上时。当我运行“ npm rebuild”时,它将进入一个永无休止的makefile,以尝试从源代码进行构建(或者至少持续了一个多小时,并且没有明显进展):
sqlite3@4.0.9 install /home/pi/.node-red/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.9/node-v57-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.9 and node@8.11.4 (node-v57 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/.node-red/node_modules/sqlite3/build'
ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep
Release/obj/gen/sqlite-autoconf-3280000/sqlite3.c
TOUCH Release/obj.target/deps/action_before_build.stamp
CC(target) Release/obj.target/sqlite3/gen/sqlite-autoconf-3280000/sqlite3.o
^Cdeps/sqlite3.target.mk:123: recipe for target
'Release/obj.target/sqlite3/gen/sqlite-autoconf-3280000/sqlite3.o' failed
make: *** [Release/obj.target/sqlite3/gen/sqlite-autoconf-3280000/sqlite3.o] Interrupt
简而言之,我无法使用contrib节点,因为sqlite不会加载-这是解决我的问题的理想解决方案。
当我运行“ sudo npm rebuild”时,我会遇到错误:
sqlite3@4.0.9 install /home/pi/.node-red/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.0.9/node-v72-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.0.9 and node@12.4.0 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/12.4.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/.node-red/node_modules/sqlite3/.node-gyp"
make: Entering directory '/home/pi/.node-red/node_modules/sqlite3/build'
make: *** No rule to make target '../.node-gyp/12.4.0/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/home/pi/.node-red/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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.42-v7+
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/pi/.node-
red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /home/pi/.node-red/node_modules/sqlite3
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build 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/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:200:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 4.19.42-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/pi/.node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/sqlite3
node-pre-gyp ERR! node -v v12.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
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/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v72-linux-arm --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.9 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3@4.0.9 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-06-15T23_16_13_885Z-debug.log
如果有帮助,我会在以后的注释中附加调试日志。
我已尝试遵循以下建议: bcrypt@1.0.3 install: `node-pre-gyp install --fallback-to-build`
在这里: Error with npm-gyp during npm rebuild
在两种情况下,这都意味着遵循所有建议,包括找到正确的python版本并尝试通过python框架路由命令(尝试在python中运行npm)
以及登录到AWS尝试下载构建二进制文件 4.0.9,我还使用nvm安装了节点v10.16.0,v8.16.0和 v12.4.0并已在所有三个框架上运行“ npm rebuild” 相同的输出
我希望“ npm rebuild”可以使我使用sql节点,并且 telegrambot节点,所以我可以得到一些基本流程 演示即将发布。