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:
- st_geometry.so for Linux64 9.5 is copied to
/usr/local/lib/postgresql/, and is readable by the postgres user
- LD_LIBRARY_PATH, PGDATA, and PATH are all set to the correct values
- 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, authorization_file='/home/arcgis/authorization.ecp')
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?