Hi

I am developing a small app to run on a raspberry pi device. During development I have been using the nodejs sqlanywhere package.

Running my application on an x86 architecture works fine. When I attempt to run it on the raspberry pi (arm architecture) I receive an error similar to the below

Error: Could not load modules for Platform: 'linux', Process Arch: 'arm', and Version: 'v7.9.0"

Is there an arm driver available for the nodejs sqlanywhere module? I have read that sqlanywhere itself supports arm, does anyone have any advice on how I could inject a driver for my use case?

Many thanks

asked 18 Jan, 17:08

gandotee's gravatar image

gandotee
465
accept rate: 0%


Are you using the correct Node.js driver for the Raspberry Pi device? The driver for your Linux X86 box will not work on the Pi since the Pi uses an ARM processor (not x86).

To install the node.js driver on the Pi, you should be able to simply run:

npm install sqlanywhere

You will need to have the Linux ARM version of SQL Anywhere installed on your device before you will be able to use the driver. Note that the SQLA version provides 32 bit executables and libraries so if you are using a recent Pi that is fully 64bit (Pi 3) then you may need to use 32bit compatibility mode (if one exists? I haven't used a Pi 3 ... so don't know the exact details).

The SQL Anywhere node.js driver uses a library (shipped with SQLA) called libdbcapi. You will need to ensure that you run sa_config.[c]sh before using node so that the installation directory containing this library (and other SQLA libraries) are in your path.

Here is an article (written for v16 but still applies for v17) that may help you get started on the Pi. The article helps you get started using python but it uses the same libdbcapi library to interface to the SQLA server.

HTH

permanent link

answered 19 Jan, 09:34

Mark%20Culp's gravatar image

Mark Culp
23.6k9134278
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×16
×9

question asked: 18 Jan, 17:08

question was seen: 81 times

last updated: 19 Jan, 09:34