Here you can find the steps to install and configure the Oracle Instant Client on Ubuntu 12.04.
First of all you need to go to the following link http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html and choose the Instant Client for your platform (in my case it is "Instant Client for Linux x86").
On the next web page select "Accept License Agreement" so you can download some rpm packets of the latest available Instant Client version (today is Version 184.108.40.206.0).
Click on oracle-instantclient12.1-basic-220.127.116.11.0-1.i386.rpm (Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications), oracle-instantclient12.1-sqlplus-18.104.22.168.0-1.i386.rpm (Instant Client Package - SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client) and oracle-instantclient12.1-devel-22.214.171.124.0-1.i386.rpm (Instant Client Package - SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client).
To be available to download those rpm packets you have also to sign in into the Oracle website.
Next step is to install alien on your distribution.
From the man page "alien is a program that converts between Red Hat rpm, Debian deb, Stampede slp, Slackware tgz, and Solaris pkg file formats. If you want to use a package from another linux distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it."
ubuntu@ubuntu-VirtualBox:~$ sudo apt-get install alienThen go to your download directory and list the available rpm packets.
ubuntu@ubuntu-VirtualBox:~$ cd Downloads/ ubuntu@ubuntu-VirtualBox:~/Downloads$ ls oracle-instantclient12.1-basic-126.96.36.199.0-1.i386.rpm oracle-instantclient12.1-devel-188.8.131.52.0-1.i386.rpm oracle-instantclient12.1-sqlplus-184.108.40.206.0-1.i386.rpmLet's install all of them using alien command:
ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle-instantclient12.1-sqlplus-220.127.116.11.0-1.i386.rpm dpkg --no-force-overwrite -i oracle-instantclient12.1-sqlplus_18.104.22.168.0-2_i386.deb Selecting previously unselected package oracle-instantclient12.1-sqlplus. (Reading database ... 142987 files and directories currently installed.) Unpacking oracle-instantclient12.1-sqlplus (from oracle-instantclient12.1-sqlplus_22.214.171.124.0-2_i386.deb) ... Setting up oracle-instantclient12.1-sqlplus (126.96.36.199.0-2) ...Now it's time for the Instant Client Basic Package:
ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle-instantclient12.1-basic-188.8.131.52.0-1.i386.rpm dpkg --no-force-overwrite -i oracle-instantclient12.1-basic_184.108.40.206.0-2_i386.deb Selecting previously unselected package oracle-instantclient12.1-basic. (Reading database ... 143000 files and directories currently installed.) Unpacking oracle-instantclient12.1-basic (from oracle-instantclient12.1-basic_220.127.116.11.0-2_i386.deb) ... Setting up oracle-instantclient12.1-basic (18.104.22.168.0-2) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking placeAnd finally it's time for Instant Client SDK Package:
ubuntu@ubuntu-VirtualBox:~/Downloads$ sudo alien -i oracle-instantclient12.1-devel-22.214.171.124.0-1.i386.rpm dpkg --no-force-overwrite -i oracle-instantclient12.1-devel_126.96.36.199.0-2_i386.deb Selecting previously unselected package oracle-instantclient12.1-devel. (Reading database ... 143016 files and directories currently installed.) Unpacking oracle-instantclient12.1-devel (from oracle-instantclient12.1-devel_188.8.131.52.0-2_i386.deb) ... Setting up oracle-instantclient12.1-devel (184.108.40.206.0-2) ...Let's try to issue the sqlplus command
ubuntu@ubuntu-VirtualBox:~$ sqlplus / as sysdba sqlplus: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directoryOps.. it fails because of a missing shared object file: libaio.so.1 So install libaio1 using the usual apt-get command.
ubuntu@ubuntu-VirtualBox:~$ sudo apt-get install libaio1 Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libaio1 0 upgraded, 1 newly installed, 0 to remove and 608 not upgraded. Need to get 6,648 B of archives. After this operation, 53.2 kB of additional disk space will be used. Get:1 http://it.archive.ubuntu.com/ubuntu/ precise/main libaio1 i386 0.3.109-2ubuntu1 [6,648 B] Fetched 6,648 B in 0s (12.5 kB/s) Selecting previously unselected package libaio1. (Reading database ... 143067 files and directories currently installed.) Unpacking libaio1 (from .../libaio1_0.3.109-2ubuntu1_i386.deb) ... Setting up libaio1 (0.3.109-2ubuntu1) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking placeLet's try to run sqlplus again.
ubuntu@ubuntu-VirtualBox:~/Downloads$ sqlplus / as sysdba sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directorysqlplus complains about missing libraries. You can solve creating/editing the oracle.conf file issuing the following command and simply adding a line (the path where were installed all the libraries of the Instant Client packages: /usr/lib/oracle/12.1/client/lib):
ubuntu@ubuntu-VirtualBox:~/Downloads$sudo vi /etc/ld.so.conf.d/oracle.conf /usr/lib/oracle/12.1/client/libNow update the information of all the shared libraries on your system.
ubuntu@ubuntu-VirtualBox:~/Downloads$sudo ldconfigRun sqlplus again... and as you can see it works...
ubuntu@ubuntu-VirtualBox:~$ sqlplus / as sysdba SQL*Plus: Release 220.127.116.11.0 Production on Sun Jul 14 20:01:37 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-12162: TNS:net service name is incorrectly specified... even if there's no database to connect to...
On the next post a new Oracle Database 12c will be finally available.