Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install node-sqlite3 on Raspberry pi 3 running raspbian #933

Closed
zerox029 opened this issue Jan 12, 2018 · 12 comments
Closed

Can't install node-sqlite3 on Raspberry pi 3 running raspbian #933

zerox029 opened this issue Jan 12, 2018 · 12 comments

Comments

@zerox029
Copy link

zerox029 commented Jan 12, 2018

I have a node application using sqlite3 running perfectly fine on windows. However, when I send it over to my pi and try downloading the packages, sqlite3 doesn't work.
I get the following errors when trying to install :

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v57-linux-arm.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.13 and node@8.9.4 (node-v57 ABI) (falling back to source compile with node-gyp)

And the following when trying to run the program afterwards:

Error: Cannot find module '/var/Dash/node_modules/sqlite3/lib/binding/node-v57-linux-arm/node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:538:15)
    at Function.Module._load (module.js:468:25)
    at Module.require (module.js:587:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/Dash/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)

node version: 8.9.4

Any help would be appreciated,
thanks

@Nostradamos
Copy link

Nostradamos commented Jan 19, 2018

Did you try to build node-sqlite3 from source? Looks like there are no binaries for linux-arm.
https://github.com/mapbox/node-sqlite3#source-install

@zerox029
Copy link
Author

zerox029 commented Jan 19, 2018

Just tried it and it gives me the same error message.

@zerox029
Copy link
Author

I tried installing sqlite3 instead of sqlite but now im stuck on the following:

make: Entering directory '/var/Dash/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

@zerox029
Copy link
Author

Ok, fixed it, thank you @Nostradamos. That was it 👍

@wmertens
Copy link
Contributor

So you can close this, right @zerox029 ?

@jyy1082
Copy link

jyy1082 commented Apr 24, 2018

@zerox029 Could you share how do you fix that? I have the same issue to install on ARM.
image

@ardhi
Copy link

ardhi commented May 17, 2018

sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr

it works on my rpi3 - raspbian stretch lite

@lectrician1
Copy link

@zerox029 I'm having the same issue as @jyy1082. Could you please be more specific on how you solved this?

@abmnukmr
Copy link

try with npm install sqlite3 --unsafe

@caiowilson
Copy link

caiowilson commented Dec 4, 2019

sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr

it works on my rpi3 - raspbian stretch lite

FWIW
not working with raspbian buster rpi 3

@majdarov
Copy link

sudo apt-get install libsqlite3-dev
npm install sqlite3 --build-from-source --sqlite=/usr

it works on my opi r1 - armbian 5.4.6-sunxi (Ubuntu bionic based Armbian for the Orange Pi R1 )

@AviBueno
Copy link

It worked for me once I installed the 64-bit (arm64) OS version. Couldn't get it to work with the 32-bit (arm).
See my comment on issue #906 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants