Solution skill
Error loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so)
Complete solution
Shows how to fix error loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "Error loading shared library libnsl.so.1: N o such file or directory (needed by /lib/libclntsh.so)": i fixed the problem `` RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \ mkdir /opt/oracle && \ cd /opt/oracle && \ curl -OL download.oracle.com/otn\software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ rm -rf instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ cd /opt/oracle/instantclient\19\_6 && \ ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 && \ ln -s /lib/libc.so.6 /usr/lib/libre
Error loading shared library libnsl.so.1: N o such file or directory (needed by /lib/libclntsh.so)Steps
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \ mkdir /opt/oracle && \ cd /opt/oracle && \ curl -OL download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ rm -rf instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ cd /opt/oracle/instantclient_19_6 && \ ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 && \ ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ apk add --no-cache libaio libnsl libc6-compat && \ echo "export LD_LIBRARY_PATH=/opt/oracle/mount the host path instantclient_19_6 at container path /lib64:$LD_LIBRARY_PATH" >> /etc/profile.d/oracle_client.sh && \ echo "export PATH=/opt/oracle/instantclient_19_6:$PATH" >> /etc/profile.d/oracle_client.sh- Also searched as: "loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so)"
When to use
You are seeing this: Also searched as: "loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so)" Use this skill when you run into "Error loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 19.6.0.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Edge cases
- Also searched as: "loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so)"
Evidence
Source: Stack Overflow #67088381 (accepted answer, 3 votes): I get this Error everytime i try to connect to the Oracle DB: ``` DPI-1047: Cannot locate a 64-bit Oracle Client library: "Error loading shared library libnsl.so.1: N o such file or directory (needed by /lib/libclntsh.so)". See oracle.github.io/node-oracledb/INSTALL.html for help Node-oracledb installation instructions: oracle.github.io/node-oracledb/INSTALL.html You must have 64-bit Oracle client libraries in LDLIBRARYPATH, or configured with ldconfig. If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from...
Verified resolution: I fixed the problem `` RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \ mkdir /opt/oracle && \ cd /opt/oracle && \ curl -OL download.oracle.com/otn_software/linux/instantclient/19600/instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ unzip instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ rm -rf instantclient-basic-linux.x64-19.6.0.0.0dbru.zip && \ cd /opt/oracle/instantclient_19_6 && \ ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 && \ ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ apk add --no-cache libaio libnsl libc6-compat && \ echo "export LD_LIBRARY_PATH=/opt/oracle/mount the host path instantclient_19_6 at container path /lib64:$LD_LIBRARY_PATH" >> /etc/profile.d/oracle_client.sh && \ echo "export PATH=/opt/oracle/instantclient_19_6:$PATH" >> /etc/profile.d/oracle_client.sh
Source URL: https://stackoverflow.com/questions/67088381/error-loading-shared-library-libresolv-so-2-no-such-file-or-directory-needed
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_uT5bBJKaTu3UM29nGkMbow" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Error loading shared library libresolv.so.2 : No such file or directory (needed by /lib/libclntsh.so) <span>— Vectle</span></a>