ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
192 stars 150 forks source link

Install failure node-red-contrib-db2 #485

Closed DeanLiu0521 closed 6 years ago

DeanLiu0521 commented 6 years ago

Trying to install node-red-contrib-db2 for Node-Red on Raspbian. 8 Nov 18:22:59 - [info] Node-RED version: v0.19.4 8 Nov 18:22:59 - [info] Node.js version: v8.11.1 8 Nov 18:22:59 - [info] Linux 4.14.71-v7+ arm LE

I tried to install using following command. npm install node-red-contrib-db2 Here is the log.

> ibm_db@2.4.0 install /home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db
> node installer/driverInstall.js

Downloading DB2 ODBC CLI Driver from https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxia32_odbc_cli.tar.gz...

100.00% | 19551546 bytes downloaded out of 19551546 bytes.

****************************************
You are downloading a package which includes the Node.js module for IBM DB2/Informix.  The module is licensed under the Apache License 2.0. The package also includes IBM ODBC and CLI Driver from IBM, which is automatically downloaded as the node module is installed on your system/device. The license agreement to the IBM ODBC and CLI Driver is available in undefined   Check for additional dependencies, which may come with their own license agreement(s). Your use of the components of the package and dependencies constitutes your acceptance of their respective license agreements. If you do not accept the terms of any license agreement(s), then delete the relevant component(s) from your device.
****************************************

Downloading and extraction of DB2 ODBC CLI Driver completed successfully ...

make: Entering directory '/home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db/build'
  CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
odbc_bindings.target.mk:96: recipe for target 'Release/obj.target/odbc_bindings/src/odbc.o' failed
make: Leaving directory '/home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db/build'

{ Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db/.node-gyp"
In file included from ../src/odbc.cpp:28:0:
../src/odbc.h:27:21: fatal error: sqlcli1.h: No such file or directory
 #include <sqlcli1.h>
                     ^
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:285:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.71-v7+
gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=/home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db/installer/clidriver"
gyp ERR! cwd /home/pi/node_modules/node-red-contrib-db2-fixed/node_modules/ibm_db
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok 

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
  killed: false,
  code: 1,
  signal: null,
  cmd: 'node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"' }
npm ERR! Linux 4.14.71-v7+
npm ERR! argv "/usr/bin/node" "/usr/local/bin/npm" "install" "node-red-contrib-db2-fixed"
npm ERR! node v8.11.1
npm ERR! npm  v2.15.12
npm ERR! code ELIFECYCLE

npm ERR! ibm_db@2.4.0 install: `node installer/driverInstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ibm_db@2.4.0 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!     /home/pi/npm-debug.log

Can you give me any hint?

bimalkjha commented 6 years ago

@DeanLiu0521 Your platform is of ARM LE architecture but downloaded linuxia32_odbc_cli.tar.gz is of ia32 architecture. Unfortunately arm and ia32 are not compatible and IBM do not have any ODBC driver for ARM LE platform. So, you can not install ibm_db on this platform. Please go through issue #31 for details about it. Thanks.