sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

sqlplus error while loading shared libraries libaio.so.1 cannot open shared object file
sqlplus: error while loading shared libraries: libnsl so 1
error loading message shared library sqlplus windows
sqlplus: error while loading shared libraries: libsqlplus.so: wrong elf class: elfclass64
error while loading shared libraries: libclntsh so 11.1 wrong elf class: elfclass32
sqlldr error while loading shared libraries libnfsodm12 so
sap libclntsh so 11.1 cannot open shared object file: no such file or directory
unable to find library libsqlplus so

Please suggest a solution for solving this issue?? While giving the command:

sqlplus /nolog

the error that occurred:

 sqlplus: error while loading shared libraries:
 libsqlplus.so: cannot open shared object file: No such file or directory

The minimum configuration to properly run sqlplus from the shell is to set ORACLE_HOME and LD_LIBRARY_PATH. For ease of use, you might want to set the PATH accordingly too.

Assuming you have unzipped the required archives in /opt/oracle/instantclient_11_1:

$ export ORACLE_HOME=/opt/oracle/instantclient_11_1
$ export LD_LIBRARY_PATH="$ORACLE_HOME"
$ export PATH="$ORACLE_HOME:$PATH"

$ sqlplus

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Dec 31 14:06:06 2014
...

Oracle Database “sqlplus: error while loading shared libraries , sqlplus command shared library error full definition is like below. libsqlplus.so: cannot open shared object file: No such file or directory. The minimum configuration to properly run sqlplus from the shell is to set ORACLE_HOME and LD_LIBRARY_PATH.For ease of use, you might want to set the PATH accordingly too.

I did solve this error by setting

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME

yes, not only $ORACLE_HOME/lib but $ORACLE_HOME too.

sqlplus: error while loading shared libraries, The minimum configuration to properly run sqlplus from the shell is to set ORACLE_HOME and open("/oracle/product/12.1.0/db_1/lib/libsqlplus.so", O_RDONLY) = -1 EACCES (Permission denied) The file's content looks like: This problem are because oracleinstant client not configure shared library. This blog is written based on the issue faced due to huge response time of sql query waiting on dblink. Issue: Query responding in a

sudo sh -c "echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf";sudo ldconfig

from https://help.ubuntu.com/community/Oracle%20Instant%20Client

Solved – SQL*Plus “error while loading shared libraries: libsqlplus , Solved – SQL*Plus “error while loading shared libraries: libsqlplus.so: cannot open shared object file” If you run into this error while trying to use Oracle's SQL*Plus tool on Linux, it means you didn't correctly add all of the necessary Oracle library paths to your LD_LIBRARY_PATH environment variable. Oracle Training from Don Burleson The best on site " Oracle training classes" are just a phone call away!You can get personalized Oracle training by Donald Burleson, right at your shop!

PERMISSIONS: I want to stress the importance of permissions for "sqlplus".

  1. For any "Other" UNIX user other than the Owner/Group to be able to run sqlplus and access an ORACLE database , read/execute permissions are required (rx) for these 4 directories :

    $ORACLE_HOME/bin , $ORACLE_HOME/lib, $ORACLE_HOME/oracore, $ORACLE_HOME/sqlplus

  2. Environment. Set those properly:

    A. ORACLE_HOME (example: ORACLE_HOME=/u01/app/oranpgm/product/12.1.0/PRMNRDEV/)

    B. LD_LIBRARY_PATH (example: ORACLE_HOME=/u01/app/oranpgm/product/12.1.0/PRMNRDEV/lib)

    C. ORACLE_SID

    D. PATH

     export PATH="$ORACLE_HOME/bin:$PATH"
    

sqlplus: error while loading shared libraries: libsqlplus , sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory · ubuntu installation Your $​LD_LIBRARY_PATH does not include the path to Oracle libraries. Your bash profile shows: Also make sure that the library files themselves are readable. You can use ldd to verify  Changes. Issue happens only on Oracle Linux 7 and Red Hat Enterprise Linux 7. Issue only when performing clone, There might other instance which are working fine.

I know it's an old thread, but I got into this once again with Oracle 12c and LD_LIBRARY_PATH has been set correctly. I have used strace to see what exactly it was looking for and why it failed:

 strace sqlplus /nolog

sqlplus tries to load this lib from different dirs, some didn't exist in my install. Then it tried the one I already had on my LD_LIBRARY_PATH:

open("/oracle/product/12.1.0/db_1/lib/libsqlplus.so", O_RDONLY) = -1 EACCES (Permission denied)

So in my case the lib had 740 permissions, and since my user wasn't an owner or didn't have oracle group assigned I couldn't read it. So simple chmod +r helped.

libsqlplus.so: cannot open shared object file: No such file or directory, sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory. Hmm. When I checked the  Error: adcfgclone Fails on Apps Tier with below error which is reported in RCloneApplyAppstier_04200721.log /u01/TEMP/app/fs1/EBSapps/10.1

sqlplus: error while loading shared libraries tips, sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory. How do I fix this sqlplus: error while  It looks like a 32/64 bit mismatch. The ldd output shows that mainly libraries from /lib64 are chosen. That would indicate that you have installed a 64 bit version of the Oracle client and have created a 64 bit executable.

error while loading shared libraries: libsqlplu, sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory. There was no error message 

error while loading shared libraries: libsqlplus.so: cannot open , Linux and Solution Of The Error:” error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory”.

Comments
  • How do you source your environment ? Show us.
  • yes, but only when executables and libraries are all in $ORACLE_HOME/ and not when they are installed in their own dirs like $ORACLE_HOME/bin/ and $ORACLE_HOME/lib/
  • @ik_zelf Right. But for some reasons I assumed the OP was using SQL*Plus as provided as part of the instantclient package. Those are mostly flat archives with all libraries and binaries in the base directory. Of course, if you move the files after having extracted them as explained here ( ;) ), you have to adjust the various environment variables accordingly.
  • Even if you install from a RPM, you still need this little bit of magic sauce that allows sqlplus to work (with corrections to the correct version of the Oracle client, of course). Setting the LD_LIBRARY_PATH environment variable, as so many other pages suggest, does not work. It's a shame that it needs to be wired into the system, because it turns it from a "download the client and run it" to "get a syadmin's help to install it".
  • Version 18.3 is the current version and this little bit of script will also get around weirdly restrictive sudo permissions: echo /usr/lib/oracle/18.3/client64/lib > /tmp/oracle-instantclient.conf ; sudo cp /tmp/oracle-instantclient.conf /etc/ld.so.conf.d ; sudo ldconfig
  • This helped me to find out the cause. The installer is really awful. I had to reinstall it so the paths are correct.
  • Ran this and it still wouldn't work for me.