I am creating, or attempting to create, an enterprise geodatabase using PostgreSQL 9.5 (via the postgres:9.5-alpine Docker image) and arcpy on ArcGIS Server 10.5.1, both on Linux. I have followed the instructions for setting the database up, such that:

  1. st_geometry.so for Linux64 9.5 is copied to /usr/local/lib/postgresql/, and is readable by the postgres user
  2. LD_LIBRARY_PATH, PGDATA, and PATH are all set to the correct values
  3. The PostgreSQL role (postgres) has superuser privileges

However, when I run

arcpy.CreateEnterpriseGeodatabase_management('PostgreSQL', host_name, 
     db_name, True, 'postgres', db_pw, 'SDE_SCHEMA', 'sde', sde_pw, 

I still get this error:

arcgisscripting.ExecuteError: You must copy the latest ST_GEOMETRY library to the PostgreSQL software location. Refer to the ArcGIS help topics for more details.

Connected RDBMS instance is not setup for Esri spatial type configuration.

Is there something I'm missing, or a way to more precisely diagnose what (else) might be causing this error?

  • Not sure of my suggestion, but just in case : shouldn't you activate a postgis extension in pgAdmin ? (CREATE EXTENSION postgis;) ...hum..maybe not, it activates the PG_GEOMETRY i think. Not your problem it seems.
    – gisnside
    Feb 6, 2019 at 15:55
  • ArcGIS enterprise geodatabases use a different geometry implementation than PostGIS, which is why the st_geometry.so is necessary. But, thanks for replying!
    – Evan
    Feb 6, 2019 at 16:19
  • Actually, I suggested that because you can use the PG_GEOMETRY is necessary ;) My data is hosted in an enterprise GDB using PG_GEOMETRY (see desktop.arcgis.com/en/arcmap/10.3/manage-data/geodatabases/…). You just need to use the right keyword when you save into your e-gdb. But i'm not sure it solves your installation problem.
    – gisnside
    Feb 6, 2019 at 16:55
  • So why did the other documentation I read say that wasn't supported?!? Sigh, ESRI . 🙄
    – Evan
    Feb 7, 2019 at 17:03
  • have a try here maybe ? gis.stackexchange.com/questions/252533/… seems it starts with arcgis 10.4
    – gisnside
    Feb 7, 2019 at 19:51


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.