Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DPI-1047: Cannot locate a 64-bit Oracle Client library: libclntsh.so | AWS Lambda | Node Version 20 #1667

Unanswered
sathiappancei asked this question in Q&A
Discussion options

Hello everyone,

I am using node-oracledb version 6.4.0 and when my NodeJS lambdas retrieve data from an on-premises Oracle database using the node-oracledb package, everything functions smoothly under Node V18 runtime. However, upon transitioning to Node Version 20, we encounter an error. "Cannot locate a 64-bit Oracle Client library: libclntsh.so".

image

Vs

image

Any suggestions on resolving the problem would be greatly appreciated.

Thanks

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

May I ask how you configured everything to connect from a Lambda? Did you have to deal with a wallet or TLS?

You must be logged in to vote
0 replies
Comment options

I ran into this as well.

It looks like glibc 2.27 stopped including libnsl by default. AL2 was using a version juuust before that change was made (2.26), but AL2023 uses glibc 2.34. There is a separate libnsl package available in the AL2023 repo, which is not installed by default.

The node v18 and older Lambda runtimes are based on AL2. Starting with the node v20 runtime, it's instead based on AL2023.

So I think the error message is misleading: it can find libclntsh.so just fine, but this depends on libnsl.so.1, which is no longer available from the OS. I spun up an EC2 with AL2023, installed the package, and then grabbed the libnsl.so.1 file. I included it in my Lambda with the rest of the instant client libs, and that got it working.

You must be logged in to vote
1 reply
Comment options

cjbj May 30, 2024
Maintainer

Try either Thin mode, or a more recent Instant Client (21 or 23) that doesn't need libnsl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /