Node-sqlite3: Sqlite3 Module will not install from NPM on Rasphberry Pi B+

Created on 5 Jul 2016  路  5Comments  路  Source: mapbox/node-sqlite3

Hello! I am new to forums so please forgive me if the formatting is incorrect. I will appreciate all formatting tips. I am trying to install the sqlite3 module from NPM on my Rasphberry PI runing Debian wheezy. The error that the output gives me is long, but is summed up in the sentence. "node-pre-gyp install --fallback-to-build fails on your system". Below is the output from my PI.

nikipedia@Wadsworth ~ $ sudo npm install sqlite3 -g
[sudo] password for nikipedia:

[email protected] install /usr/local/lib/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v48-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (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/6.2.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/sqlite3/build'
make: *** No rule to make target '../.node-gyp/6.2.2/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/local/lib/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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.18.11+
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=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm"
gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
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=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:852:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
node-pre-gyp ERR! System Linux 3.18.11+
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
node-pre-gyp ERR! node -v v6.2.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
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=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm' (1)
npm ERR! Linux 3.18.11+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "sqlite3" "-g"
npm ERR! node v6.2.2
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR! npm bugs sqlite3
npm ERR! Or if that isn't available, 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/nikipedia/npm-debug.log

Most helpful comment

I'm getting this too! https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v48-linux-arm.tar.gz doesn't work. This issue and the duplicate #664 both got closed?

All 5 comments

Did you try just :
$ npm install sqlite3 ?

I just did it for a Raspberry Pi 3 with Node 6.3.0 and it didn't get a precompiled version but the process compiled it on the fly. Got some warnings but didn't throw errors.

Duplicate of #664

I'm getting this too! https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.4/node-v48-linux-arm.tar.gz doesn't work. This issue and the duplicate #664 both got closed?

As far as I can see, #664 is not closed?

Ah, you're right. Sorry about that.

Was this page helpful?
0 / 5 - 0 ratings