Reference: https://help.ubuntu.com/community/Oracle%20Instant%20Client
Tested on: Ubuntu 18.04, 20.04
-
Decide which version of the Oracle client to install
- Each version of the client supports certain versions of the database; for example, Oracle client 12.1 supports Oracle database 10.2 - 19c
- See here for more information: http://support.oracle.com/epmos/faces/DocumentDisplay?id=207303.1
-
Download the Oracle client packages
- Go here and download the desired RPM package(s): https://www.oracle.com/database/technologies/instant-client/downloads.html
- At a minimum you'll need either the
basiclite
package (for English error messages and Western language character sets) or thebasic
package (to support all languages) - Get the
sqlplus
package if you'd like to use thesqlplus
command
-
Install prerequisites
sudo apt install alien libaio1
-
Install the Oracle client package(s)
sudo alien -i oracle-instantclient19.12-basiclite-19.12.0.0.0-1.x86_64.rpm
-
Update the system library path to include the oracle libraries
Note: This doesn't seem to be necessary any more; maybe it's included in the newer versions of the Oracle library package now?
sudo sh -c 'echo /usr/lib/oracle/19.12/client64/lib/ > /etc/ld.so.conf.d/oracle.conf' sudo ldconfig
Well done, worked for me. If anyone is just trying to update Library Path with the newly installed instant client location, it won't work.
Following step 5. will do the job.