SangminKim
SangminKim

Reputation: 9146

libsqlplus.so: connot open shared object file : No such file or directory even though PATH contain the path

I downloaded Instant Oracle Client Version 11.2.0.4.0(basic, sqlplus, devel .rpm file) by Oracle website in Ubuntu. After converting .rpm into .deb using alien, I installed it, basic first and sqlplus and last devel.

And then I tried to run sqlplus.

But It is saying sqlplus64: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

Even though my PATH contains the PATH.

The below shows my PATH and the location of libsqlplus.so.

A@ubuntu:~$ sudo find / -name libsqlplus.so
/usr/lib/oracle/11.2/client64/lib/libsqlplus.so

A@ubuntu:~$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/sangmin/eclipse:/usr/lib/oracle/11.2/client64/lib:/usr/lib/oracle/11.2/client64

Upvotes: 9

Views: 28561

Answers (2)

gidi gob
gidi gob

Reputation: 61

Might worth checking the permissions issue: sqlplus: error while loading shared libraries

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"
    

Upvotes: 0

sontp
sontp

Reputation: 306

Test your Oracle client. User either sqlplus either sqlplus64 depending on your platform. In my case, I used:

$ sqlplus64 username/password@//dbhost:1521/SID

If you get the next message, then you need to instruct sqlplus to use the proper libray:

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

To do so, first find the location of Oracle libraries. The path should be something like /usr/lib/oracle/<version>/client(64)/lib/. In my case (Ubuntu 14.04 LTS, Intel on 64-bit), it was /usr/lib/oracle/11.2/client64/lib/.

Now, add this path to the system library list. Create and edit a new file:

$ sudo nano /etc/ld.so.conf.d/oracle.conf

Add inside the path:

/usr/lib/oracle/11.2/client64/lib/

Run now the dynamic linker run-time bindings utility:

$ sudo ldconfig

If sqlplus yields of a missing libaio.so.1 file, run:

$ sudo apt-get install libaio1

For other errors when trying to run sqlplus, please consult the Ubuntu help page.

Upvotes: 16

Related Questions