Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

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

Closed

Description

@tunamayo04

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

Activity

  1. Nostradamos commented on Jan 19, 2018

    @Nostradamos

    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

  2. tunamayo04 commented on Jan 19, 2018

    @tunamayo04
    Author

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

  3. tunamayo04 commented on Jan 19, 2018

    @tunamayo04
    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
    
  4. tunamayo04 commented on Jan 19, 2018

    @tunamayo04
    Author

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

  5. wmertens commented on Jan 21, 2018

    @wmertens
    Contributor

    So you can close this, right @zerox029 ?

  6. jyy1082 commented on Apr 24, 2018

    @jyy1082

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

  7. ardhi commented on May 17, 2018

    @ardhi

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

    it works on my rpi3 - raspbian stretch lite

  8. lectrician1 commented on Aug 26, 2018

    @lectrician1

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

  9. abmnukmr commented on Apr 15, 2019

    @abmnukmr

    try with npm install sqlite3 --unsafe

  10. caiowilson commented on Dec 4, 2019

    @caiowilson

    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

  11. majdarov commented on Dec 30, 2019

    @majdarov

    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 )

  12. AviBueno commented on May 26, 2023

    @AviBueno

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions