ERROR

ORA-06522: libsg.so: cannot open shared object file: No such file or directory

Last Published: April 25, 2020

Error Message

When accessing the Spatial Type for Oracle using SQL, the following error message displays:

"ERROR:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: libsg.so: cannot open shared object file: No such file or directory
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 12
ORA-06512: at "SDE.ST_GEOMETRY", line 56"

Instead of 'libsg.so', the error message may cite 'libpe.so', 'pe.dll' or 'sg.dll'. The same cause applies in all cases.

Cause

A required library file cannot be located and loaded by the extproc process.

The extproc process uses the directory paths listed in the environment variable EXTPROC_DLLS to find library files it directly loads, including libst_shapelib.so or st_shapelib.dll. However, that library in turn loads other libraries, such as the projection engine (libpe.so or pe.dll). The EXTPROC_DLL environment variable is not used to find those additional libraries. Those additional libraries are found using standard operating system methods, such as looking up their paths in the PATH or LD_LIBRARY_PATH environment variables.

Solution or Workaround

Instruct the extproc process where to find the library files it needs.

  1. In the listener.ora file, it is possible to define environment variables to be used by the extproc process when it runs. Define the environment variables that specify the search path for libraries is within the listener.ora file. Specify full paths, and do not use environment variable substitution (e.g., %mypath%). On Windows and Unix operating systems, the directory path syntax will be different. Use the correct syntax and environment variables for your operating system.

    In this example that is typical for many Unix systems, the environment variable to be defined is named LD_LIBRARY_PATH.
    (ENVS="EXTPROC_DLLS=/disc1/sde/sdeexe93/lib/libst_shapelib.so,LD_LIBRARY_PATH=/disc1/sde/sdeexe93/lib")

  2. Restart the Oracle Listener.

    Note:
    Refer to Oracle's Database Net Services Administrator's Guide chapter on Enabling Advanced Features of Oracle Net Services for information about configuring the Oracle extproc process.

Article ID:000009385

Software:
  • ArcMap 9 x
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic