ibmdb / node-ibm_db

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

Installing ibm_db on Mac(High Sierra v10.13.6) #447

Closed kobecow closed 6 years ago

kobecow commented 6 years ago

My node.js version is v8.11.4(also tried v8.7.0)

When I tried to sudo npm install ibm_db , I got this error.

seijinishis-air:~ seijinishi$ sudo npm install ibm_db Password:

ibm_db@2.4.0 install /Users/seijinishi/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/macos64_odbc_cli.tar.gz...

100.00% | 20080158 bytes downloaded out of 20080158 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 ...

fs.js:1068 return binding.unlink(pathModule._makeLong(path)); ^

Error: EACCES: permission denied, unlink '/Users/seijinishi/node_modules/ibm_db/build.zip' at Object.fs.unlinkSync (fs.js:1068:18) at /Users/seijinishi/node_modules/ibm_db/installer/driverInstall.js:457:20 at FSReqWrap.cb [as oncomplete] (fs.js:313:19) npm WARN enoent ENOENT: no such file or directory, open '/Users/seijinishi/package.json' npm WARN seijinishi No description npm WARN seijinishi No repository field. npm WARN seijinishi No README data npm WARN seijinishi No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 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. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/seijinishi/.npm/_logs/2018-09-10T13_54_18_443Z-debug.log

I really don't understand this error. I have used sudo, but I got Error: EACCES: permission denied, unlink. Why this issue happened ?

bimalkjha commented 6 years ago

@kobecow You can check permission of /Users/seijinishi/node_modules using ls -l. If this directory do not exist, create it. Also would recommend to run below commands: chmod 755 /Users/seijinishi/node_modules cd /Users/seijinishi npm install ibm_db Thanks.

kobecow commented 6 years ago

@bimaljha I have already done your suggestion. same issue remains. seijinishis-air:~ seijinishi$ ls -l | grep node_modules drwxrwxrwx 3 seijinishi staff 96 9 10 22:56 node_modules seijinishis-air:~ seijinishi$ sudo npm install ibm_db Password:

ibm_db@2.4.0 install /Users/seijinishi/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/macos64_odbc_cli.tar.gz...

100.00% | 20080158 bytes downloaded out of 20080158 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 ...

fs.js:1068 return binding.unlink(pathModule._makeLong(path)); ^

Error: EACCES: permission denied, unlink '/Users/seijinishi/node_modules/ibm_db/build.zip' at Object.fs.unlinkSync (fs.js:1068:18) at /Users/seijinishi/node_modules/ibm_db/installer/driverInstall.js:457:20 at FSReqWrap.cb [as oncomplete] (fs.js:313:19) npm WARN enoent ENOENT: no such file or directory, open '/Users/seijinishi/package.json' npm WARN seijinishi No description npm WARN seijinishi No repository field. npm WARN seijinishi No README data npm WARN seijinishi No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 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. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/seijinishi/.npm/_logs/2018-09-11T05_46_13_765Z-debug.log

bimalkjha commented 6 years ago

@kobecow Could you try below commands:

git clone https://github.com/ibmdb/node-ibm_db.git
cd node-ibm_db
npm install

Thanks.

kobecow commented 6 years ago

@bimalkjha Thanks. Your solution works for me. my environment is node is v8.11.4 npm is v6.4.1

I did one more command

git clone https://github.com/ibmdb/node-ibm_db.git

cd node-ibm_db

npm install

npm audit fix //+ request@2.88.0 //added 6 packages from 5 contributors, removed 13 packages and updated 21 packages in 4.215s //fixed 5 of 5 vulnerabilities in 178 scanned packages

bimalkjha commented 6 years ago

@kobecow Thanks for confirmation. Closing the issue now.