Please suggest a solution for solving this issue?? While giving the command sqlplus /nolog
the error occurred is
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
..
Please suggest a solution for solving this issue?? While giving the command sqlplus /nolog
the error occurred is
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
:
sh$ export ORACLE_HOME=/opt/oracle/instantclient_11_1 sh$ export LD_LIBRARY_PATH="$ORACLE_HOME" sh$ export PATH="$ORACLE_HOME:$PATH" sh$ sqlplus SQL*Plus: Release 11.1.0.7.0 - Production on Wed Dec 31 14:06:06 2014 ...
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.
PERMISSIONS: I want to stress the importance of permissions for "sqlplus".
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
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"
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
It means you didn't set ORACLE_HOME and ORACLE_SID variables. Kindly set proper working $ORACLE_HOME and $ORACLE_SID and after that execute sqlplus /nolog command. It will be working.
Could you please check if LD_LIBRARY_PATH points to the oracle libs
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.
You should already have all needed variables in /etc/profile.d/oracle.sh
. Make sure you source it:
$ source /etc/profile.d/oracle.sh
PS: this file's content looks like:
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 don't have it, create it and source it.
You can try usage:
# echo "/usr/lib/oracle/12.2/client64/lib" > /etc/ld.so.conf.d/oracle.conf # ldconfig
This problem are because oracleinstant client not configure shared library.
Don't forget
apt-get install libaio1 libaio-dev
or
yum install libaio