libsqlplus.so: cannot open shared object file: No such file or directory
Recently I had to install SQL*Plus on a Linux host. In order to do so, I downloaded the appropriate Oracle Instant Client packages from the Oracle site. For my installation, I chose the ZIP files. After I unzipped the client and tried to run sqlplus
, I go the following error:
simon@pandora instantclient_11_2$ ./sqlplus
./sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
Hmm. When I checked the directory with the sqlplus
binary, the file libsqlplus.so
was clearly there.
To fix this error, you have to set the LD_LIBRARY_PATH
environment variable to the folder where the “libsqlplus.so” file resides. So for example, if you put the Instant Client into /opt/oracle/instantclient_11_2
, set the variable like this:
simon@pandora:instantclient_11_2$ export LD_LIBRARY_PATH=/opt/oracle/instantclient_11_2
Then, your SQL*Plus client should work as expected:
simon@pandora:instantclient_11_2$ ./sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Thu May 8 15:05:20 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL>