English

Error: -51 ERROR: could not access file "st_geometry": No such file or directory

Error Message

An error similar to the following is reported in the $SDEHOME/etc/sde_setup.log.

“[Fri Apr 3 09:23:20 2009] ST_GEOMETRY support being installed... [Fri Apr 3 09:23:21 2009] ev.SQLstate = 58P01 SDE DBMS Error: -51 ERROR: could not access file "st_geometry": No such file or directory"

Cause

The ST_GEOMETRY library files need to be copied.

Solution or Workaround

  1. Log in as the root user and copy the following files from the ArcSDE installation library folder or the installation media to the PostgreSQL lib directory:
    • st_geometry.so
    • libpe.so
    • libsg.so
  2. Verify that the shared objects are in /usr/lib ($PGBASE is /usr):
    Code:
    ls -l /usr/lib/st_geometry.so /usr/lib/libpe.so /usr/lib/libsg.so

    -r-xr-xr-x 1 root root 1878411 2009-04-01 08:54 /usr/lib/libpe.so
    -r-xr-xr-x 1 root root 375528 2009-04-01 08:55 /usr/lib/libsg.so
    -r-xr-xr-x 1 root root 205170 2009-04-01 08:55 /usr/lib/st_geometry.so

  3. Modify postgresql.conf to set the dynamic_library_path parameter to indicate the path for dynamically loadable modules in PostgreSQL:

    Code:
    dynamic_library_path = '/opt/PostgreSQL/8.3.0/lib:$libdir'

  4. Re-initialize PostgreSQL with the new parameters and confirm the change:

    Code:
    postgres=# SELECT pg_reload_conf(); pg_reload_conf

    t (1 row)

    postgres=# SELECT current_setting('dynamic_library_path'); current_setting

    /usr/lib (1 row)