Friday, June 12, 2015

ld.so.1: oracle: fatal: libclntshcore.so.12.1: open failed: No such file or directory

Version:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

OS :Oracle Solaris on SPARC

Issue:

After applying PSU 12.1.0.2.3, connection to DB to do the startup, via sqlplus was failing. Was not able to connect to DB via sqlplus. The environment variables were set via ".oraenv" command.

Error:

sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 12 07:15:23 2015

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

ld.so.1: oracle: fatal: libclntshcore.so.12.1: open failed: No such file or directory
ERROR:
ORA-12547: TNS:lost contact

Verification:

The file mentioned () was present under the $ORACLE_HOME/lib folder.

 ls -ltr $ORACLE_HOME/lib | grep libclntshcore
-rwxrwxr-x   1 oradba   oinstall 7275016 Jun 12 07:10 libclntshcore.so.12.1
lrwxrwxrwx   1 oradba   oinstall      21 Jun 12 07:10 libclntshcore.so -> libclntshcore.so.12.1

So it could be due to the location missing in the Library path variable.

Solution:

Set the environment variable, LD_LIBRARY_PATH to $ORACLE_HOME/lib.

export LD_LIBRARY_PATH=$ORACLE_HOME/lib

After this able to connect to sqlplus without any issues.