sqlplus64 tools are used to connect and manage Oracle Databases.
sqlplus64 is 64 bit version of the
sqlplus. After installating these tools successfully when we try to run
sqlplus command we may get an shared object file or library error.
sqlplus Shared Library Error
sqlplus command shared library error full definition is like below. Keep in mind that for 64 bit version it will be
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
We can understand that shared library
libsqlplus.so can not be found in the defined library path. Library path is stored in bash environment variable
LD_LIBRARY_PATH . So first we will check this environment variable.
$ echo $LD_LIBRARY_PATH
We can see that there is no path in
LD_LIBRARY_PATH. So there will be no library to load.
Add Oracle Library To The LD_LIBRARY_PATH
In order to load sqlplus library we will add
libsqlplus.so path to the
LD_LIBRARY_PATH. By default
libsqlplus.so will stored in
/usr/lib/oracle/18.3/client64/lib/ where version 18.3 will be set according to your version. We will use
export command to add this path to the
$ export LD_LIBRARY_PATH="/usr/lib/oracle/18.3/client64/lib/" $ echo $LD_LIBRARY_PATH
Find libsqlplus.so Library Path
If we can not find
libsqlplus.so in the default paths we may need to search for. We can use
locate command in order to find the path of the
First we will update the file database with the
$ sudo updatedb
And then we will search for the library.
$ locate libsqlplus.so
Run sqlplus Without Problem
Now everything seems OK. We can run
sqlplus command without problem like below.