Install SQL*Plus on Linux
Updated: May 3, 2021
When some random guy’s blog ranks higher than the Oracle docs, what does that tell you?
SQL*Plus Version 12.2.0.1.0 #
-
Navigate to Instant Client Downloads for Linux x86-64 (64-bit)
-
Download these zip files:
instantclient-basic-linux.x64-12.2.0.1.0.zip
instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
-
Make dir for instant client then unzip zips
mkdir -p /opt/oracle unzip -d /opt/oracle instantclient-basic-linux.x64-12.2.0.1.0.zip unzip -d /opt/oracle instantclient-sqlplus-linux.x64-12.2.0.1.0.zip
-
The file listing of that dir should now look like
$ cd /opt/oracle/instantclient_12_2 && find . -type f | sort ./adrci ./BASIC_README ./genezi ./glogin.sql ./libclntshcore.so.12.1 ./libclntsh.so.12.1 ./libipc1.so ./libmql1.so ./libnnz12.so ./libocci.so.12.1 ./libociei.so ./libocijdbc12.so ./libons.so ./liboramysql12.so ./libsqlplusic.so ./libsqlplus.so ./ojdbc8.jar ./sqlplus ./SQLPLUS_README ./uidrvci ./xstreams.jar
-
Set the
LD_LIBRARY_PATH
andPATH
env vars in your~/.bashrc
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH export PATH=$LD_LIBRARY_PATH:$PATH
-
Source your
~/.bashrc
source ~/.bashrc
-
Run
sqlplus -V
to confirm it’s installed
SQL*Plus Version 19.3.0.0.0 #
-
Navigate to Instant Client Downloads for Linux x86-64 (64-bit)
-
Download these zip files:
instantclient-basic-linux.x64-19.3.0.0.0dbru.zip
instantclient-sqlplus-linux.x64-19.3.0.0.0dbru.zip
-
Make dir for instant client then unzip zips
mkdir -p /opt/oracle unzip -d /opt/oracle instantclient-basic-linux.x64-19.3.0.0.0dbru.zip unzip -d /opt/oracle instantclient-sqlplus-linux.x64-19.3.0.0.0dbru.zip
-
The file listing of that dir should now look like
$ cd /opt/oracle/instantclient_19_3 && find . -type f | sort ./adrci ./BASIC_LICENSE ./BASIC_README ./genezi ./glogin.sql ./libclntshcore.so.19.1 ./libclntsh.so.19.1 ./libipc1.so ./libmql1.so ./libnnz19.so ./libocci.so.19.1 ./libociei.so ./libocijdbc19.so ./liboramysql19.so ./libsqlplusic.so ./libsqlplus.so ./network/admin/README ./ojdbc8.jar ./sqlplus ./SQLPLUS_LICENSE ./SQLPLUS_README ./ucp.jar ./uidrvci ./xstreams.jar
-
Set the
LD_LIBRARY_PATH
andPATH
env vars in your~/.bashrc
export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3:$LD_LIBRARY_PATH export PATH=$LD_LIBRARY_PATH:$PATH
-
Source your
~/.bashrc
source ~/.bashrc
-
Run
sqlplus -V
to confirm it’s installed
Note: If you get the following error, then see potential solutions at https://stackoverflow.com/questions/10619298/libaio-so-1-cannot-open-shared-object-file
sqlplus: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory