$ npm install sqlite3
[email protected] install /home/xubuntu/Downloads/node_modules/sqlite3
node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v48-linux-ia32.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)
make: Entering directory '/home/xubuntu/Downloads/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
AR(target) Release/obj.target/deps/sqlite3.a
COPY Release/sqlite3.a
CXX(target) Release/obj.target/node_sqlite3/src/database.o
make: g++: Command not found
node_sqlite3.target.mk:114: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed
make: * [Release/obj.target/node_sqlite3/src/database.o] Error 127
make: Leaving directory '/home/xubuntu/Downloads/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/xubuntu/.programs/node/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:215:12)
gyp ERR! System Linux 4.8.0-36-generic
gyp ERR! command "/home/xubuntu/.programs/node/bin/node" "/home/xubuntu/.programs/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32"
gyp ERR! cwd /home/xubuntu/Downloads/node_modules/sqlite3
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/xubuntu/.programs/node/bin/node /home/xubuntu/.programs/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32' (1)
node-pre-gyp ERR! stack at ChildProcess.
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:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.8.0-36-generic
node-pre-gyp ERR! command "/home/xubuntu/.programs/node/bin/node" "/home/xubuntu/Downloads/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/xubuntu/Downloads/node_modules/sqlite3
node-pre-gyp ERR! node -v v6.9.5
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/home/xubuntu/.programs/node/bin/node /home/xubuntu/.programs/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/xubuntu/Downloads/node_modules/sqlite3/lib/binding/node-v48-linux-ia32' (1)
npm WARN enoent ENOENT: no such file or directory, open '/home/xubuntu/Downloads/package.json'
npm WARN Downloads No description
npm WARN Downloads No repository field.
npm WARN Downloads No README data
npm WARN Downloads No license field.
npm ERR! Linux 4.8.0-36-generic
npm ERR! argv "/home/xubuntu/.programs/node/bin/node" "/home/xubuntu/.programs/node/bin/npm" "install" "sqlite3"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
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/xubuntu/Downloads/npm-debug.log
Log File:
npm-debug.txt
We support installing via binaries if you are running on a 64 bit system. It looks like you are running on a 32 bit system, so the source compile fallback is happening and you are missing a compiler. The g++: Command not found error above is the key problem. You can solve this by doing sudo apt-get install g++ and then rebuilding node-sqlite3. Or changing your system to use a 64 bit version.
Most helpful comment
We support installing via binaries if you are running on a 64 bit system. It looks like you are running on a 32 bit system, so the source compile fallback is happening and you are missing a compiler. The
g++: Command not founderror above is the key problem. You can solve this by doingsudo apt-get install g++and then rebuilding node-sqlite3. Or changing your system to use a 64 bit version.