Oracle GoldenGate GGSCI : Shared libraries loading errors

While running Oracle GoldenGate's command line interpreter, ggsci, I got the below error. Let us see what caused this and how we can get rid of this.

ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory

GGSCI requires libraries in Oracle Home. The two shared objects are libnnz11.so and libclntsh.so.11.1. These two libraries are found in ORACLE_HOME/lib directory

$ORACLE_HOME/lib/libnnz11.so
$ORACLE_HOME/lib/libclntsh.so.11.1

So, there are two possiblites that you get this error.

Running ldd on ggsci reveals all required libraries. ldd is a Unix commd that shows the shared libraries that are required by an executables

[oracle@voice ogg1]$ ldd ggsci
linux-gate.so.1 =>  (0x00fb8000)
libdl.so.2 => /lib/libdl.so.2 (0x00b90000)
libgglog.so => /u01/ogg1/libgglog.so (0x00d64000)
libggrepo.so => /u01/ogg1/libggrepo.so (0x0072c000)
libdb-5.2.so => /u01/ogg1/libdb-5.2.so (0x00110000)
libicui18n.so.38 => /u01/ogg1/libicui18n.so.38 (0x002c1000)
libicuuc.so.38 => /u01/ogg1/libicuuc.so.38 (0x0088c000)
libicudata.so.38 => /u01/ogg1/libicudata.so.38 (0x00fb9000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00b96000)
libxerces-c.so.28 => /u01/ogg1/libxerces-c.so.28 (0x02de8000)
libantlr3c.so => /u01/ogg1/libantlr3c.so (0x00bd4000)
libnnz11.so => not found
libclntsh.so.11.1 => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00422000)
libm.so.6 => /lib/libm.so.6 (0x00b67000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0029d000)
libc.so.6 => /lib/libc.so.6 (0x00a21000)
/lib/ld-linux.so.2 (0x009fe000)
Remedy
Set and export Oracle Home

In the Unix session, do the following to set and export ORACLE_HOME.Make sure that it points to right software installtion directory

ORACLE_HOME=<your Oracle Home>
export ORACLE_HOME

You can see the ORACLE_HOME is set by echoing ORACLE_HOME as below :

echo $ORACLE_HOME

After setting and export ORACLE_HOME, running ldd on ggsci shows all libraries are now accessible

[oracle@voice ogg1]$ ldd ggsci
linux-gate.so.1 =>  (0x00b5b000)
libdl.so.2 => /lib/libdl.so.2 (0x00b90000)
libgglog.so => /u01/ogg1/libgglog.so (0x00320000)
libggrepo.so => /u01/ogg1/libggrepo.so (0x008ba000)
libdb-5.2.so => /u01/ogg1/libdb-5.2.so (0x00110000)
libicui18n.so.38 => /u01/ogg1/libicui18n.so.38 (0x00446000)
libicuuc.so.38 => /u01/ogg1/libicuuc.so.38 (0x005a7000)
libicudata.so.38 => /u01/ogg1/libicudata.so.38 (0x00b94000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0029d000)
libxerces-c.so.28 => /u01/ogg1/libxerces-c.so.28 (0x082d7000)
libantlr3c.so => /u01/ogg1/libantlr3c.so (0x002b4000)
libnnz11.so => /u03/app/oracle/product/11.2.0/db3/lib/libnnz11.so (0x0780f000)
libclntsh.so.11.1 => /u03/app/oracle/product/11.2.0/db3/lib/libclntsh.so.11.1 (0x0472a000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x006c8000)
libm.so.6 => /lib/libm.so.6 (0x00b67000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x002c4000)
libc.so.6 => /lib/libc.so.6 (0x06f8f000)
/lib/ld-linux.so.2 (0x009fe000)
libnsl.so.1 => /lib/libnsl.so.1 (0x002d0000)
libaio.so.1 => /usr/lib/libaio.so.1 (0x00a1c000)

Now, ggsci should start without any issue

Comments