smchamberlin / node-red-contrib-ibm-db2

Node-RED nodes to work with a Db2 LUW database. Works with "Db2 on Cloud" and "Db2 Warehouse on Cloud" services as well as standalone installation of Db2 LUW.
4 stars 14 forks source link

Re: Failure installing on Raspberry Pi - missing sqlcli1.h ? #10

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi, I'm getting the following failure when trying to install on Raspberry Pi - any Ideas, please - sqlcli1.h missing ?:

$ sudo npm install -g node-red-nodes-cf-sqldb-dashdb npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. |

ibm_db@0.0.19 install /usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxia32_odbc_cli.tar.gz... Download and extraction of DB2 ODBC CLI Driver completed successfully ... make: Entering directory '/usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db/build' CXX(target) Release/obj.target/odbc_bindings/src/odbc.o odbc_bindings.target.mk:98: recipe for target 'Release/obj.target/odbc_bindings/src/odbc.o' failed make: Leaving directory '/usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db/build'

{ [Error: Command failed: gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.29" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db/.node-gyp" In file included from ../src/odbc.cpp:25:0: ../src/odbc.h:30:21: fatal error: sqlcli1.h: No such file or directory

include

                 ^

compilation terminated. make: *\ [Release/obj.target/odbc_bindings/src/odbc.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12) gyp ERR! System Linux 4.4.13-v7+ gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IBM_DB_HOME=/usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db/installer/clidriver" "--IS_DOWNLOADED=true" gyp ERR! cwd /usr/lib/node_modules/node-red-nodes-cf-sqldb-dashdb/node_modules/ibm_db gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok ] killed: false, code: 1, signal: null } npm ERR! Linux 4.4.13-v7+ npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "node-red-nodes-cf-sqldb-dashdb" npm ERR! node v0.10.29 npm ERR! npm v2.15.9 npm ERR! code ELIFECYCLE

npm ERR! ibm_db@0.0.19 install: node installer/driverInstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db@0.0.19 install script 'node installer/driverInstall.js'. npm ERR! This is most likely a problem with the ibm_db package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node installer/driverInstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ibm_db npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm ERR! npm owner ls ibm_db npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /usr/lib/node_modules/node-red/npm-debug.log

ghost commented 8 years ago

Sorted the installed by downloading git repo locally & installing. Error was actually in ibm-db@0.0.19 on Pi.

Just realised, however, that this node module is for running from within Bluemix, so I can't use it on my IoT gateway.

smchamberlin commented 8 years ago

Hi flcgit, so you were able to successfully install on your RP and see the nodes on your canvass?

Sorry to report that you are correct, currently the node leverages the connection information from Bluemix. However requests have come in to make a more generic node and remove that dependency; if that would also be useful for you, we could open an issue to track that as well.

ghost commented 8 years ago

Hi Steve, Well, it got onto the canvas, yes, but that's about as far as it got. I hacked it (I'm not a programmer) to accept my own connection (via the debug flag in your js), however, on deploying it whined about missing odbc_bindings.node for ibm_db node module. Googling around that may be because there is no ibm_db for the ARM (Raspberry Pi) platform ! (the first thing ibm_db does is download linuxia32_odbc_cli.tar ... which is ia platform). So I guess I'm stuck using some rather convoluted route into a dashDB. Thanks anyway.

smchamberlin commented 8 years ago

flcgit -- I think you are right about the ARM support, unfortunately ... However I have heard that dashDB also has REST API, maybe you could use that , instead?