Sqlplus: error loading shared libraries: libsqlplus.so: cannot open shared objects file: no such file or directory

Please suggest a solution to solve this problem ?? When issuing a command:

sqlplus /nolog 

error occurred:

  sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory 
+11
source share
10 answers

The minimum configuration for running sqlplus from the shell is to set ORACLE_HOME and LD_LIBRARY_PATH . For ease of use, you can also set PATH accordingly.

Assuming you unpacked the necessary 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 ... 
+13
source

I solved this error by setting

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

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

+6
source
 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

+6
source

PERMISSIONS: I want to emphasize the importance of rights for "sqlplus".

  • For any "other" UNIX user other than the owner / group, in order to be able to run sqlplus and access the ORACLE database, read / execute (rx) permissions are required for these 4 directories:

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

  • Environment. Install them correctly:

    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" 
+3
source

I know this is an old thread, but I realized it again when Oracle 12c and LD_LIBRARY_PATH are set correctly. I used strace to find out exactly what he was looking for and why this failed:

  strace sqlplus /nolog 

sqlplus is trying to download this library from different directories, some of them do not exist in my installation. Then he tried the one that I already had on LD_LIBRARY_PATH:

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

So, in my case, lib had 740 permissions, and since my user was not the owner or did not have an oracle group assigned, I could not read it. Simple chmod +r helped.

+3
source

You should already have all the necessary variables in /etc/profile.d/oracle.sh . Make sure you find it:

$ source /etc/profile.d/oracle.sh

PS: the contents of this file look like this:

 ORACLE_HOME=/usr/lib/oracle/11.2/client64 PATH=$ORACLE_HOME/bin:$PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib export ORACLE_HOME export LD_LIBRARY_PATH export PATH 

If you do not have it, create it and submit.

+1
source

You can try using:

 # echo "/usr/lib/oracle/12.2/client64/lib" > /etc/ld.so.conf.d/oracle.conf # ldconfig 

This problem is because the oracleinstant client does not configure the shared library.

+1
source

This means that you did not specify the variables ORACLE_HOME and ORACLE_SID. Please configure the correct working $ ORACLE_HOME and $ ORACLE_SID, then run the sqlplus / nolog command. He will work.

0
source

Could you check if LD_LIBRARY_PATH points to oracle libs

0
source

Do not forget

 apt-get install libaio1 libaio-dev 

or

 yum install libaio 
-1
source

Source: https://habr.com/ru/post/980349/


All Articles