Hi, I am trying to install sqlite node on node red and am unable to do so.
It seems the compiled library for sqlite isnt available and so the installation process tries to compile the same but it fails with an error “/bin/sh python not found”. How do I tell node-red to find python which is already installed on my machine.
OS : Debian , Node red add on verison : 9.0.0
I have included the required system_packages of node-red config:
credential_secret: '!secret nodered_credential'
theme: default
http_node:
username: admin
password: '!secret nodered_http'
http_static:
username: admin_s
password: '!secret nodered_http_s'
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: true
system_packages:
- make
- g++
- linux-headers
npm_packages: []
init_commands: []
dark_mode: false
contextStorage:
default:
module: memory
storeInFile:
module: localfilesystem
log_level: info
Error logs:
-----------------------------------------------------------
2021-04-22T10:37:11.458Z Install : node-red-node-sqlite 0.6.0
2021-04-22T10:37:10.843Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-04-22T10:37:15.838Z [err] npm
2021-04-22T10:37:15.838Z [err] WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
2021-04-22T10:37:20.088Z [out]
2021-04-22T10:37:20.088Z [out] > [email protected] install /config/node-red/node_modules/sqlite3
2021-04-22T10:37:20.088Z [out] > node-pre-gyp install --fallback-to-build
2021-04-22T10:37:20.088Z [out]
2021-04-22T10:37:21.322Z [err] node-pre-gyp
2021-04-22T10:37:21.322Z [err] WARN Using request for node-pre-gyp https download
2021-04-22T10:37:22.466Z [err] node-pre-gyp
2021-04-22T10:37:22.466Z [err] WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz
2021-04-22T10:37:22.466Z [err] node-pre-gyp
2021-04-22T10:37:22.467Z [err] WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp)
2021-04-22T10:37:27.546Z [out] make: Entering directory '/config/node-red/node_modules/sqlite3/build'
2021-04-22T10:37:27.547Z [out] ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
2021-04-22T10:37:27.550Z [err] /bin/sh: python: not found
2021-04-22T10:37:27.550Z [err] make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
2021-04-22T10:37:27.551Z [out] make: Leaving directory '/config/node-red/node_modules/sqlite3/build'
2021-04-22T10:37:27.554Z [err] gyp
2021-04-22T10:37:27.555Z [err]
2021-04-22T10:37:27.555Z [err] ERR! build error
2021-04-22T10:37:27.557Z [err] gyp
2021-04-22T10:37:27.557Z [err] ERR!
2021-04-22T10:37:27.557Z [err] stack Error: `make` failed with exit code: 2
2021-04-22T10:37:27.557Z [err] gyp
2021-04-22T10:37:27.557Z [err] ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2021-04-22T10:37:27.557Z [err] gyp ERR!
2021-04-22T10:37:27.557Z [err] stack at ChildProcess.emit (events.js:315:20)
2021-04-22T10:37:27.557Z [err] gyp
2021-04-22T10:37:27.558Z [err] ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
2021-04-22T10:37:27.558Z [err] gyp
2021-04-22T10:37:27.558Z [err] ERR! System Linux 4.19.0-16-amd64
2021-04-22T10:37:27.558Z [err] gyp ERR!
2021-04-22T10:37:27.559Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
2021-04-22T10:37:27.559Z [err] gyp
2021-04-22T10:37:27.559Z [err] ERR! cwd /config/node-red/node_modules/sqlite3
2021-04-22T10:37:27.559Z [err] gyp ERR! node -v
2021-04-22T10:37:27.559Z [err] v14.16.1
2021-04-22T10:37:27.559Z [err] gyp ERR!
2021-04-22T10:37:27.559Z [err] node-gyp -v v5.1.0
2021-04-22T10:37:27.559Z [err] gyp
2021-04-22T10:37:27.560Z [err] ERR! not ok
2021-04-22T10:37:27.565Z [err] node-pre-gyp
2021-04-22T10:37:27.566Z [err] ERR! build error
2021-04-22T10:37:27.567Z [err] node-pre-gyp ERR!
2021-04-22T10:37:27.567Z [err] stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-04-22T10:37:27.567Z [err] node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2021-04-22T10:37:27.567Z [err] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2021-04-22T10:37:27.567Z [err] node-pre-gyp
2021-04-22T10:37:27.567Z [err] ERR! stack at maybeClose (internal/child_process.js:1048:16)
2021-04-22T10:37:27.567Z [err] node-pre-gyp ERR! stack
2021-04-22T10:37:27.567Z [err] at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
2021-04-22T10:37:27.568Z [err] node-pre-gyp ERR!
2021-04-22T10:37:27.568Z [err] System Linux 4.19.0-16-amd64
2021-04-22T10:37:27.568Z [err] node-pre-gyp ERR!
2021-04-22T10:37:27.568Z [err] command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2021-04-22T10:37:27.568Z [err] node-pre-gyp ERR! cwd /config/node-red/node_modules/sqlite3
2021-04-22T10:37:27.568Z [err] node-pre-gyp ERR! node -v v14.16.1
2021-04-22T10:37:27.568Z [err] node-pre-gyp
2021-04-22T10:37:27.568Z [err] ERR! node-pre-gyp -v v0.11.0
2021-04-22T10:37:27.568Z [err] node-pre-gyp ERR!
2021-04-22T10:37:27.568Z [err] not ok
2021-04-22T10:37:27.569Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/config/node-red/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
2021-04-22T10:37:28.149Z [err] npm ERR! code ELIFECYCLE
2021-04-22T10:37:28.149Z [err] npm ERR! errno 1
2021-04-22T10:37:28.159Z [err] npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
2021-04-22T10:37:28.159Z [err] npm ERR! Exit status 1
2021-04-22T10:37:28.159Z [err] npm ERR!
2021-04-22T10:37:28.159Z [err] npm ERR! Failed at the [email protected] install script.
2021-04-22T10:37:28.159Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-04-22T10:37:28.242Z [err]
2021-04-22T10:37:28.242Z [err] npm ERR! A complete log of this run can be found in:
2021-04-22T10:37:28.242Z [err] npm ERR! /root/.npm/_logs/2021-04-22T10_37_28_165Z-debug.log