Closed Alankarsharma closed 1 year ago
This is a limitation of the client libraries on Linux. It's documented in https://oracle.github.io/node-oracledb/doc/api.html#oracleclientloadinglinux :
Note on Linux initOracleClient() is only useful to force immediate loading of the libraries because the libraries must also be in the system library search path, i.e. configured with ldconfig or set in LD_LIBRARY_PATH, before Node.js is started.
LD_LIBRARY_PATH is also set. If I run following code even then behavior is exactly same. const oracledb = require('oracledb'); oracledb.initOracleClient();
How is LD_LIBRARY_PATH
set? If it is not set before the process starts it has no effect.
I have set it in command line before running program. Have verified value also in program by printing it on console log.
Show us exactly how you set the variable.
Do you have the nnz file? Do you have any permissions issues?
export LD_LIBRARY_PATH=/data/instantclinet (I have renamed original instantclient_21_8 to instantclient) This is how LD_LIBRARY_PATH is set. On same terminal session I am running 'node test.js' and 'sg groupabc -c "node test.js"' commands.
I've not played with sg but anything like that has a good chance of not propagating environment settings. Try using ldconfig as recommended in the node-oracledb installation instructions.
What's the default folder location where it will search? I will try to create a link and test.
Tried with ldconfig, it worked. Thanks.