Ubuntu: Missing library error while installing oracle 10g client



Question:

I have Oracle 10g installed in my host running in Win7. I installed ubuntu in my vmware. Now I want to connect to my Oracle db running in the host from my virtual system so that if I type sqlplus from my terminal it will connect to Oracle. So I followed the tutorial here:

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

But despite following all the steps I am still getting error as the following.

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

when I echo $LD_LIBRARY_PATH, I am getting:

/usr/lib/oracle/10.2/client/lib/:

FYI, my Oracle version is 10.2.0.1.0 and I downloaded client 10.2.0.5


Solution:1

If oracle applications, such as sqlplus, are complaining about missing libraries, you can add the Oracle libraries to the LD_LIBRARY_PATH each time it is used:

export LD_LIBRARY_PATH=/usr/lib/oracle/<version>/client(64)/lib/:$LD_LIBRARY_PATH  

For example, 12.1 version for Linux x86_64:

export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/:$LD_LIBRARY_PATH  

or to add it to the system library list create a new file as follows:

sudo vi /etc/ld.so.conf.d/oracle.conf  

and add the oracle library path as the first line. For example,

/usr/lib/oracle/12.1/client64/lib/  

or

/usr/lib/oracle/11.2/client/lib/  

Then run ldconfig:

sudo ldconfig  

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


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »