Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 963
SangminKim Avatar asked Aug 13 '15 02:08

SangminKim


1 Answers

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.

like image 63
sontp Avatar answered Nov 11 '22 18:11

sontp