on 2018 Jan 18 5:08 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.