Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install oracle client to Ubuntu 12.04

Install SQL*Plus

  1. Download .rpm package here
    • oracle-instantclinet*-basic-*.rpm
    • oracle-instantclinet*-devel-*.rpm
    • oracle-instantclinet*-sqlplus-*.rpm
  2. Install alien (sudo apt-get install alien)
  3. Convert the rpm files and install
    • sudo alien -i oracle-instantclinet*-basic-*.rpm
    • sudo alien -i oracle-instantclinet*-devel-*.rpm
    • sudo alien -i oracle-instantclinet*-sqlplus-*.rpm
  4. Install libaio1
  5. Add oracle.conf (echo /usr/lib/oracle/12.1/client/lib > /etc/ld.so.conf.d/oracle.conf) and Reload .conf (sudo ldconfig)
      • If libsqlplus.so: cannot open shared object file: No such file or directory is displayed when execute sqlplus
@Prithvirajbilla

This comment has been minimized.

Copy link

@Prithvirajbilla Prithvirajbilla commented Jun 9, 2014

client is spelled wrong in the text

@m3nu

This comment has been minimized.

Copy link

@m3nu m3nu commented Mar 30, 2016

Worked great. Lifesaver. System: Debian 8

@epidemicz

This comment has been minimized.

Copy link

@epidemicz epidemicz commented May 17, 2016

Brilliant, this is always a pain. Thanks 👍

@Hayllander

This comment has been minimized.

Copy link

@Hayllander Hayllander commented Jun 3, 2016

He missed later add the line.
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib

@simonmilz

This comment has been minimized.

Copy link

@simonmilz simonmilz commented Sep 8, 2017

Lifesaver for me 👍

@mloskot

This comment has been minimized.

@raghav18gupta

This comment has been minimized.

Copy link

@raghav18gupta raghav18gupta commented Mar 29, 2018

can't find oracle-instantclinet*-devel-*.rpm here http://www.oracle.com/technetwork/topics/linux-power-le-2835260.html

@ricardoaat

This comment has been minimized.

Copy link

@ricardoaat ricardoaat commented Aug 9, 2018

The real MVP

@sssshah

This comment has been minimized.

Copy link

@sssshah sssshah commented Jul 10, 2019

This is great! Thank you! Btw, if you're using Oracle 18c, than you may need to change it to /usr/lib/oracle/18.3/client64/lib/
Also, you can find the default /network/admin directory here - /usr/lib/oracle/18.3/client64/lib/network/admin
This is the location for sqlnet.ora, tnsnames.ora etc

@VinnyLima

This comment has been minimized.

Copy link

@VinnyLima VinnyLima commented Oct 4, 2019

Thanks, you help me!!

@hcervantes

This comment has been minimized.

Copy link

@hcervantes hcervantes commented Oct 11, 2019

I'm getting: sqlplus: command not found
I've install 19.3 basic lite and it seems to not recognize sqlplus command. I've set ORACLE_HOME to the correct value. If I navigate to /usr/lib/oracle/19.3/client64, I do not see sqlplus command anywhere there.

@sssshah

This comment has been minimized.

Copy link

@sssshah sssshah commented Oct 11, 2019

Make sure you have installed oracle-instantclinet*-sqlplus-*.rpm as well. The basic client does not have SqlPlus.

@hcervantes

This comment has been minimized.

@hcervantes

This comment has been minimized.

Copy link

@hcervantes hcervantes commented Oct 15, 2019

Make sure you have installed oracle-instantclinet*-sqlplus-*.rpm as well. The basic client does not have SqlPlus.

This worked. After I installed the oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm, I had to integrate the Ora libs by:
export LD_LIBRARY_PATH=/usr/lib/oracle/19.3/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

@YoshiTheChinchilla

This comment has been minimized.

Copy link

@YoshiTheChinchilla YoshiTheChinchilla commented Oct 18, 2019

It's not "oracle-instantclinet*"!
The right name is "oracle-instantclient*"

@janakact

This comment has been minimized.

Copy link

@janakact janakact commented Jan 27, 2020

Works great. Thanks ^_^

@Daniel-Lima-Carvalho

This comment has been minimized.

Copy link

@Daniel-Lima-Carvalho Daniel-Lima-Carvalho commented Aug 31, 2020

It worked. Thank you.

@nmofonseca

This comment has been minimized.

Copy link

@nmofonseca nmofonseca commented Oct 7, 2020

Thansk for this.
The installation was preety smoth using 12.2 instead of 12.1 like in ubuntu server. For some reason when I tried in WSL2 Ubuntu the installation also works however even with export TNS_ADMIN=pathtotnsnames or placing tnsnames.ora/sqlnet.ora into /usr/lib/oracle/12.2/client64/lib/network/admin or /usr/lib/oracle/12.2/client64/network/admin it still doesn't connect to the databases. As anyone tried this in WSL2? Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment