Closed vic-ibm closed 2 years ago
@vic-ibm It seems you are trying to install ibm_db
on a 32bit Linux OS or 32bit node.js is installed. Because, the pasted error mentions that ibm_db is trying to download linuxia32_odbc_cli.tar.gz and 32bit platform is not supported by ibm_db.
Please check the starting output of npm install ibm_db
command. You can see the platform as output. Need to correct env from your side.
If still unable to resolve the issue, please share complete output of npm install ibm_db
from start and not only the error part. Thanks.
I'm trying to install it on my M1 Chip Macbook, maybe that's what's causing the issue.
Here is the entire log of npm install
100.00% | 23418799 bytes downloaded out of 23418799 bytes.
make
failed with exit code: 2node installer/driverInstall.js
@vic-ibm You need to use x64 version of node.js on M1 Chip system to install ibm_db. So, download and install https://nodejs.org/dist/v17.6.0/node-v17.6.0-darwin-x64.tar.gz or replace the installed nodejs directory with this one and then install ibm_db. It works for me. Thanks.
I'm already using x64 node.js and am able to use the library outside of Docker. The issue only arises while trying to build the image on Docker Desktop at the step where my build tries to install the ibm_db library. I was able to build the image on another non M1 Chip machine.
Apparently you need to emulate an Intel x64 image to make the build work. I was able to make the build work on my M1 Chip Macbook by running the following command:
docker build . --platform linux/amd64
Hi, I'm trying to install ibm_db but it appears to be failing at the command 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"'
This is my Dockerfile: FROM registry.cirrus.ibm.com/public/nodejs-14:latest USER root RUN su - RUN yum install sudo -y WORKDIR /home/node/app COPY package*.json ./ RUN sudo npm install COPY . . RUN npm run build CMD [ "npm","start" ]
This is the error log i get during Docker build.
10 13.85 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 ...
10 13.85
100.00% | 23418799 bytes downloaded out of 23418799 bytes.
10 26.68
10 26.68 Downloading and extraction of DB2 ODBC CLI Driver completed successfully.
10 26.68
10 28.26 make: Entering directory '/home/node/app/node_modules/ibm_db/build'
10 28.26 CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
10 28.26 make: Leaving directory '/home/node/app/node_modules/ibm_db/build'
10 28.26
10 28.26 Error: Command failed: node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
10 28.26 In file included from ../src/odbc.cpp:29:
10 28.26 ../src/odbc.h:27:10: fatal error: sqlcli1.h: No such file or directory
10 28.26 #include
10 28.26 ^
~~10 28.26 compilation terminated.
10 28.26 make: *** [odbc_bindings.target.mk:108: Release/obj.target/odbc_bindings/src/odbc.o] Error 1
10 28.26 gyp ERR! build error
10 28.26 gyp ERR! stack Error:
make
failed with exit code: 210 28.26 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
10 28.26 gyp ERR! stack at ChildProcess.emit (events.js:400:28)
10 28.26 gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
10 28.26 gyp ERR! System Linux 5.10.104-linuxkit
10 28.26 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=true" "--IBM_DB_HOME=/home/node/app/node_modules/ibm_db/installer/clidriver"
10 28.26 gyp ERR! cwd /home/node/app/node_modules/ibm_db
10 28.26 gyp ERR! node -v v14.18.2
10 28.26 gyp ERR! node-gyp -v v5.1.0
10 28.26 gyp ERR! not ok
10 28.26
10 28.26 at ChildProcess.exithandler (child_process.js:383:12)
10 28.26 at ChildProcess.emit (events.js:400:28)
10 28.26 at maybeClose (internal/child_process.js:1058:16)
10 28.26 at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5) {
10 28.26 killed: false,
10 28.26 code: 1,
10 28.26 signal: null,
10 28.26 cmd: 'node-gyp configure build --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"'
10 28.26 }