I have a shell script which Kicks off automatically when server
reboots but that script when trying to login to ggsci giving below error
/goldengate/home/./ggsci: error while loading
shared libraries: libclntsh.so.12.1: cannot open shared object file: No such
file or directory
Shell Script:
oradev01:NOTSET:/home/oracle $ cat
/goldengate/DBA/start_mgr_rc.sh
sudo su - oracle -c "export ORACLE_HOME=/opt/oracle/product/12.1.0.2.64;export
PATH=$ORACLE_HOME/bin:$PATH;export LD_LIBRARY_PATH=$ORACLE_HOME/lib;/goldengate/home/./ggsci"
<<EOF
sh sleep 30m
start mgr
EOF
exit;
Reason:
ggsci is unable to locate lib files which are available under
database ORACLE_HOME, tried to verify login manually and same issue
oradev01:NOTSET:/goldengate/home $ ./ggsci
/goldengate/home/./ggsci: error while loading shared libraries:
libclntsh.so.12.1: cannot open shared object file: No such file or directory
oradev01:NOTSET:/goldengate/home $ ldd ./ggsci
linux-vdso.so.1
=> (0x00007ffc0b5e3000)
librt.so.1 =>
/lib64/librt.so.1 (0x0000003504000000)
libdl.so.2 =>
/lib64/libdl.so.2 (0x0000003503c00000)
lib./ggscilog.so
=> /goldengate/home/./lib./ggscilog.so (0x00007f07cf2a8000)
lib./ggscirepo.so
=> /goldengate/home/./lib./ggscirepo.so (0x00007f07cf036000)
libdb-6.1.so =>
/goldengate/home/./libdb-6.1.so (0x00007f07cec51000)
lib./ggsciperf.so
=> /goldengate/home/./lib./ggsciperf.so (0x00007f07cea21000)
lib./ggsciparam.so
=> /goldengate/home/./lib./ggsciparam.so (0x00007f07cd917000)
libicui18n.so.48
=> /goldengate/home/./libicui18n.so.48 (0x00007f07cd527000)
libicuuc.so.48 =>
/goldengate/home/./libicuuc.so.48 (0x00007f07cd1a6000)
libicudata.so.48
=> /goldengate/home/./libicudata.so.48 (0x00007f07cb9e1000)
libpthread.so.0 =>
/lib64/libpthread.so.0 (0x0000003503800000)
libxerces-c.so.28
=> /goldengate/home/./libxerces-c.so.28 (0x00007f07cb41a000)
libantlr3c.so =>
/goldengate/home/./libantlr3c.so (0x00007f07cb201000)
libnnz12.so => not
found
libclntsh.so.12.1
=> not found
libons.so => not
found
libclntshcore.so.12.1
=> not found
lib./ggscinnzitp.so
=> /goldengate/home/./lib./ggscinnzitp.so (0x00007f07ca721000)
libm.so.6 =>
/lib64/libm.so.6 (0x0000003504800000)
libc.so.6 => /lib64/libc.so.6
(0x0000003503400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003503000000)
libstdc++.so.6 =>
/usr/lib64/libstdc++.so.6 (0x000000350f000000)
libgcc_s.so.1 =>
/lib64/libgcc_s.so.1 (0x000000350a400000)
oradev01:NOTSET:/goldengate/home $ exit
As ORACLE user Create Soft links
oradev01:NOTSET:/opt/oracle/product/12.1.0.2.64/lib $ ls -l
libnnz*
-rw-r--r-- 1 oracle dba 1752834 Jul 5 2016
libnnz12.a
-rwxr-xr-x 1 oracle dba 6318657 Jul 5 2016
libnnz12.so
-rw-r--r-- 1 oracle dba 19160504 Jul 5 2016
libnnzst12.a
oradev01:NOTSET:/opt/oracle/product/12.1.0.2.64/lib $ cd -
/goldengate/home
oradev01:NOTSET:/goldengate/home $ ln -s
/opt/oracle/product/12.1.0.2.64/lib/libnnz12.so libnnz12.so
oradev01:NOTSET:/goldengate/home $ ls -l libnnz12.so
lrwxrwxrwx 1 oracle dba 47 Sep 22 10:04 libnnz12.so ->
/opt/oracle/product/12.1.0.2.64/lib/libnnz12.so
oradev01:NOTSET:/goldengate/home $ ./ggsci
/goldengate/home/./ggscisci: error while loading shared
libraries: libclntsh.so.12.1: cannot open shared object file: No such file or
directory
oradev01:NOTSET:/goldengate/home $ ln -s
/opt/oracle/product/12.1.0.2.64/lib/libclntsh.so.12.1 libclntsh.so.12.1
oradev01:NOTSET:/goldengate/home $ ./ggsci
/goldengate/home/./ggscisci: error while loading shared
libraries: libons.so: cannot open shared object file: No such file or directory
oradev01:NOTSET:/goldengate/home $ ln -s
/opt/oracle/product/12.1.0.2.64/lib/libons.so libons.so
oradev01:NOTSET:/goldengate/home $ ./ggsci
/goldengate/home/./ggscisci: error while loading shared
libraries: libclntshcore.so.12.1: cannot open shared object file: No such file
or directory
oradev01:NOTSET:/goldengate/home $ ln -s
/opt/oracle/product/12.1.0.2.64/lib/libclntshcore.so.12.1 libclntshcore.so.12.1
oradev01:NOTSET:/goldengate/home $ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.170221
O./GGSCICORE_12.2.0.1.0O./GGSCIBP_PLATFORMS_170123.1033_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Jan 23 2017
23:22:14
Operating system character set identified as UTF-8.
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All
rights reserved.
GGSCI (oradev01.domain.local) 1>exit
Yes now I can login after doing softlinks
oradev01:NOTSET:/goldengate/home $ ls -lrth lib*
-rw-r----- 1 oracle dba 1.7K Jan 30 2017 libxml2.txt
-rwxr-x--- 1 oracle dba 4.7M Jan 30 2017 libxerces-c.so.28
-rwxr-x--- 1 oracle dba 1.8M Jan 30 2017 libicuuc.so.48.1
-rwxr-x--- 1 oracle dba 1.8M Jan 30 2017 libicuuc.so.48
-rwxr-x--- 1 oracle dba 2.5M Jan 30 2017
libicui18n.so.48.1
-rwxr-x--- 1 oracle dba 2.5M Jan 30 2017 libicui18n.so.48
-rwxr-x--- 1 oracle dba 22M Jan 30 2017
libicudata.so.48.1
-rwxr-x--- 1 oracle dba 22M Jan 30 2017
libicudata.so.48
-rwxr-x--- 1 oracle dba 3.0M Jan 30 2017 lib./ggscirepo.so
-rwxr-x--- 1 oracle dba 1.6M Jan 30 2017 lib./ggsciperf.so
-rwxr-x--- 1 oracle dba 43M Jan 30 2017
lib./ggsciparam.so
-rwxr-x--- 1 oracle dba 11M Jan 30 2017
lib./ggscinnzitp.so
-rwxr-x--- 1 oracle dba 14M Jan 30 2017
lib./ggscilog.so
-rwxr-x--- 1 oracle dba 2.1M Jan 30 2017 libdb-6.1.so
-rwxr-x--- 1 oracle dba 124K Jan 30 2017 libantlr3c.so
lrwxrwxrwx 1 oracle dba 47 Sep 22 10:04 libnnz12.so
-> /opt/oracle/product/12.1.0.2.64/lib/libnnz12.so
lrwxrwxrwx 1 oracle dba 53 Sep 22 10:04
libclntsh.so.12.1 -> /opt/oracle/product/12.1.0.2.64/lib/libclntsh.so.12.1
lrwxrwxrwx 1 oracle dba 45 Sep 22 10:05 libons.so
-> /opt/oracle/product/12.1.0.2.64/lib/libons.so
lrwxrwxrwx 1 oracle dba 57 Sep 22 10:05
libclntshcore.so.12.1 ->
/opt/oracle/product/12.1.0.2.64/lib/libclntshcore.so.12.1
(OR)
To Avoid this issue include $ORACLE_HOME/lib, $OGG_HOME in bash
profile