ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

libcrypto.so.1 error #986

Closed ls-jesusplasencia closed 3 months ago

ls-jesusplasencia commented 4 months ago

Hi, I found this error when I invoked a Lambda in node to use ibm_db library, my guess is this lambda needs a layer, so far i found how to create a layer with libcrypto but, I am not sure if that's enough.

{ "errorType": "Error", "errorMessage": "libcrypt.so.1: cannot open shared object file: No such file or directory", "code": "ERR_DLOPEN_FAILED", "stack": [ "Error: libcrypt.so.1: cannot open shared object file: No such file or directory", " at Object.Module._extensions..node (node:internal/modules/cjs/loader:1282:18)", " at Module.load (node:internal/modules/cjs/loader:1076:32)", " at Function.Module._load (node:internal/modules/cjs/loader:911:12)", " at Module.require (node:internal/modules/cjs/loader:1100:19)", " at require (node:internal/modules/cjs/helpers:119:18)", " at bindings (/var/task/node_modules/bindings/bindings.js:112:48)", " at Object. (/var/task/node_modules/ibm_db/lib/odbc.js:57:31)", " at Module._compile (node:internal/modules/cjs/loader:1198:14)", " at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)", " at Module.load (node:internal/modules/cjs/loader:1076:32)" ] }

bimalkjha commented 4 months ago

@ls-jesusplasencia Do you have libcrypt.so.1 installed in the system? Try running sudo yum install libxcrypt libxcrypt-compat command. Thanks.

ls-jesusplasencia commented 4 months ago

Hi @bimalkjha this is Lambda a cloud environment, There was an issue same as the one that I have, was resolved by adding a layer to the lambda with the libcrypto.so.1, but so far no solution. Keep me posted if you have a clue. Thanks.

bimalkjha commented 3 months ago

@ls-jesusplasencia Have you tried to install packages libxcrypt and libxcrypt-compat on Lambda before installing ibm_db? Having correct crypt packages in the system is a prerequisite for ibm_db to work. I am not sure about how to create a layer on top of AWS lambda. I have not used it. Thanks.