Tuesday, 12 December 2017

Oracle Database 11gR2 - Get the dependencies right ...

Having just installed Oracle 11.2 ( 11gR2 ) onto a Red Hat Enterprise Linux 7.4 VM, I was kinda getting fed up with the sqlplus command not working …..


sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory

ls -al `locate libclntsh.so`

-rwxrwx---. 1 oracle oracle 48797739 Dec 12 08:49 /home/oracle/app/oracle/product/11.2.0/dbhome_1/inventory/backup/2017-12-12_08-48-58AM/Scripts/ext/lib/libclntsh.so.11.1
-rwxrwx---. 1 oracle oracle 48797739 Dec 12 08:49 /home/oracle/app/oracle/product/11.2.0/dbhome_1/inventory/Scripts/ext/lib/libclntsh.so.11.1
-rwxr-xr-x. 1 oracle oracle        0 Dec 12 08:50 /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so



ls -al /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so*

-rwxr-xr-x. 1 oracle oracle 0 Dec 12 08:50 /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so

and yet ….

As is ever the case, Google came to my rescue; more importantly, Cody Burleson: -

which told me about the relink command: -


The log for this: -


showed me the error of my ways: -

INFO: gcc -o tnslsnr -m64
INFO: /bin/sh: gcc: command not found

INFO: make: *** [tnslsnr] Error 127

Ah, dependency time :-)

So I installed gcc using Yum, and reinstalled Oracle: -

rm -Rf /home/oracle/app/
/mnt/database/runInstaller -silent -responseFile ~/db_install.rsp 

and now it works: -


SQL*Plus: Release Production on Tue Dec 12 09:46:19 2017

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: 

Next time (!), check the dependencies, doofus !

No comments:

Grokking grep

A colleague was tinkering with grep  and, thanks to him, I discovered a bit more about the trusty little utility. I had not really explored ...