Kevin Kempf's Blog

September 2, 2011

Making the Oracle 11gR2 client install on Ubuntu 10.04 LTS

Filed under: 11g, Ubuntu — kkempf @ 3:21 pm

A Fresh Start

I recently had to reload my work notebook so it would dual-boot Windows 7 or Ubuntu 10.04 (instead of the old configuration, where Windows 7 ran inside Ubuntu via Virtual Box). As a result, I lost my tried and true Oracle client install on Ubuntu, and had to go about it from scratch again. Officially, like so many things I post about, this is totally unsupported. Realistically, I’ve been using the 11gR2 client on Ubuntu for years without incident. It’s nice to be able to right click to open a terminal session, then sqlplus apps@prod to get into my database.

Just Get to the Good Stuff!

I think I hit every possible trap going through this install; I’m going to spell them all out (as opposed to just saying “Install this package, create these links, and edit your profile this way…”) so that if anyone Googles the error messages, they might find the solution here.

First Point of Failure: Packages

I knew it wasn’t going to work without some manipulation, but I wanted to see what the errors looked like. Of course, the installer says a bazillion packages are not right, and I checked ignore all. In most cases, Ubuntu 10.04 has advanced versions of these packages, so it’s not that they’re not there, it’s just that the installer isn’t seeing the version it wants. That’s not true in the case of AOI access libraries.

The failure looks like this:

The installer chokes...

The install log provides some detail

Ensure aio-dev libraries are installed via the Ubuntu Software Center

Second Point of Failure: Symbolic Links

Without a few symbolic links, you will a mysterious error similar to this in the next in the installer when it tries to link binaries:

Ah, the mysterious nnfyboot and libagtsh.so error!

If you see this, create the following symbolic links as root:

ln -s /usr/bin/basename /bin/basename
ln -s /usr/bin/awk /bin/awk
ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

ln ­-s $ORACLE_HOME/lib/libagtsh.so.1.0 $ORACLE_HOME/lib/libagtsh.so

Third Point of Failure: Environment

This is a little murkier, as I’m not sure if I was fighting symbolic links and the environment, but ultimately you need this in your profile anyways.  So if you’re still having problems, use vi or append to /etc/profile the following lines and rerun the installer:

export ORACLE_HOME=/home/kkempf/Oracle/product/11.2.0/client_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:$LD_PIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin

Complete!

No install is complete without root.sh!

Finally!!

After (embarrassingly) realizing I forgot my tnsnames.ora file in $OH/network/admin, sqlplus fired up just fine:

sqlplus from the command line

Advertisements

Create a free website or blog at WordPress.com.