ld.so.1: sqlplus: fatal: libsqlplus.so

Applies to Oracle Database 10g and higher versions, any platform.

The following settings are for Solaris 10 64-bit Operating system.

Cannot invoke sqlplus at the command line due to following library error

%sqlplus
ld.so.1: sqlplus: fatal: libsqlplus.so: open failed: No such file or directory
Killed

Print shared library dependencies for sqlplus

%ldd sqlplus
        libsqlplus.so =>         (file not found)
        libclntsh.so.10.1 =>     (file not found)
        libnnz10.so =>   (file not found)
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsched.so.1 =>         /usr/lib/64/libsched.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libthread.so.1 =>        /lib/64/libthread.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libmd_psr.so.1

Set the LD_LIBRARY_PATH to resolve the issue.

bash
export ORACLE_HOME=/u01/prod/rdbms/10.2.0
export ORACLE_SID=appscdg
export LD_LIBRARY_PATH=/u01/prod/rdbms/10.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/u01/prod/rdbms/10.2.0/ctx/lib
export PATH=$ORACLE_HOME/bin:$PATH

Now check the binary executable

bash-3.00$ ldd $ORACLE_HOME/bin/sqlplus
        libsqlplus.so =>
/oracle02/appslos/rdbms/10.2.0/lib/libsqlplus.so
        libclntsh.so.10.1 =>
/oracle02/appslos/rdbms/10.2.0/lib/libclntsh.so.10.1
        libnnz10.so =>   /oracle02/appslos/rdbms/10.2.0/lib/libnnz10.so
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsched.so.1 =>         /usr/lib/64/libsched.so.1
        libc.so.1 =>     /lib/64/libc.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libthread.so.1 =>        /lib/64/libthread.so.1
        libm.so.1 =>     /lib/64/libm.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V240/lib/sparcv9/libmd_psr.so.1

Issue resolved.

libclntsh.so.10.1: wrong ELF class: ELFCLASS64 Killed

I was upgrading to Oracle Applications 11.5.10.2. to R12 (12.1.1) on Solaris 10 64-bit Operating System.

While invoking adadmin utility after sourcing the R12 apps environment, I faced the following error:

bash-3.00$ adadmin
ld.so.1: adadmin: fatal: /oracle02/appsdev/R12/apps/tech_st/10.1.2/lib/libclntsh.so.10.1: wrong ELF class: ELFCLASS64
Killed

Tried doing the below:

bash-3.00$ $ORACLE_HOME/bin/genclntsh -32
cat: cannot open /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/ldflags
Undefined                       first referenced
 symbol                             in file
nnfhboot                            /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(nnfgt.o)
nnflboot                            /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(nnfgt.o)
nnflgapc                            /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libnl10.a(nlpa.o)
nnftboot                            /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(nnfgt.o)
nnflgav                             /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libnl10.a(nlol.o)
nnflfrm                             /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libnl10.a(nlol.o)
nnflrne                             /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libnl10.a(nlol.o)
ntusini                             /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(ntcontab.o)
ntpini                              /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(ntcontab.o)
nttini                              /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(ntcontab.o)
ntzini                              /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libn10.a(ntcontab.o)
ld: fatal: Symbol referencing errors. No output written to /oracle02/appsdev/R12/apps/tech_st/10.1.3/lib32/libclntsh.so.10.1

@Per ‘unpublished’ Bug 5665338 – This issue is due to the libclntsh.so.10.1 library not being present under the 10.1.2 ORACLE_HOME/lib32 folder.

To fix the issue,  I did the following:

1.  Created a symbolic link

bash-3.00$ rm $ORACLE_HOME/lib32/ldflags
bash-3.00$ ln -s $ORACLE_HOME/lib/ldflags $ORACLE_HOME/lib32/ldflags
bash-3.00$ ls -ltr $ORACLE_HOME/lib32/ldflags
lrwxrwxrwx   1 appsdev  oracle         53 Apr  4 09:17 /oracle02/appsdev/R12/apps/tech_st/10.1.2/lib32/ldflags -> /oracle02/appsdev/R12/apps/tech_st/10.1.2/lib/ldflags

2. As root user, created a soft link

bash-3.00$ which make
/usr/css/bin/make
bash-3.00$  ln -s /usr/css/bin/make /usr/bin/make

2.  Tested the fix

bash-3.00$ $ genclntsh

3.  The above genclntsh command completed without error, then relinked all of the software

bash-3.00$ relink all

Check if libclntsh.so.10.1 library has been created under the 10.1.2 ORACLE_HOME/lib32 folder.

bash-3.00$  ls -ltr $ORACLE_HOME/lib32/libclntsh.so.10.1
-rwxr-xr-x   1 appsdev  oracle    18681000 Apr  4 09:23 /oracle02/appsdev/R12/apps/tech_st/10.1.2/lib32/libclntsh.so.10.1

Invoked ad utlilities now:

bash-3.00$ adadmin

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                     Oracle Applications AD Administration

                                 Version 12.0.0

NOTE: You may not use this utility for custom development
      unless you have written permission from Oracle Corporation.

Your default directory is '/oracle02/appsdev/R12/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ?

The problem got fixed for me.

References: 413109.1, 395731.1

APP-FND-01926 ORA-06508

I was upgrading Oracle Apps 11.5.10.2 to R12 and faced an issue with forms soon after applying Pre-requisite patches

APP-FND-01926:The custom event WHEN-LOGON-CHANGED raised unhandled exception:
ORA-06508: PL/SQL: could not find program unit being called

The issue can be reproduced at will with the following steps:

1. Login to http://hostname.domain:port/OA_HTML/AppsLocalLogin.jsp
2. Navigate to any forms-based application

After applying new patches, the forms and pl/sql libraries were not regenerated.

  1. Tried copying source CUSTOM.pll from backup
  2. re-compiling existing $AU_TOP/resource/CUSTOM.pll
  3. Copy and re-compile CUSTOM.pll
None of the above three helped in my case.

Finally, I did the following

1. Use adadmin and generate JAR files with force option.
2. Use adadmin and run Generate Form Files and PL/SQL Library Files

Forms started working!