Installation of Oracle Instant Client on an Ubuntu 64 machine

clientoracle

I would like to install Oracle Instant Client on a Ubuntu 64 bit machine.

Following this link, I have installed the rpm packages basic, development and sqlplus using alien.

Then:

sqlplus  username/password@//dbhost:1521/SID
sqlplus: command not found

export ORACLE_HOME=/usr/lib/oracle/12.1/client64
ls $ORACLE_HOME
bin  lib

sqlplus
sqlplus: command not found

I have tried the python script in this link, but this did not work. It conflicts with the installed 12.1 packages as it tries to install 11.2.

Best Answer

Easily solved:

export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

Stick those lines in your ~/.bash_profile if you want them to persist for a given user, or in /etc/bashrc to persist for all users.