I have created a sde schema in my PostgreSQL database, I check all the privileges and everything. I also put the st_geometry.so in lib path of PostgreSQL 9.1.3 installed on the server. I have ArcGIS 10.1
When I am trying to "enable geodatabase" from the database in ArcMap 10.1 I am getting these errors:
relation "sde.sde_layers" does not exist at character 22
STATEMENT: select count(*) from work.sde.sde_layers
ERROR: relation "sde.gdb_items" does not exist at character 15
STATEMENT: select 1 FROM sde.GDB_ITEMS
ERROR: function st_geometry_version() does not exist at character 8
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
STATEMENT: SELECT ST_GEOMETRY_VERSION()::varchar
ERROR: could not load library "/usr/local/pgsql/lib/st_geometry.so": /usr/local/pgsql/lib/st_geometry.so: undefined symbol: DirectFunctionCall1
STATEMENT: Create OR Replace FUNCTION public.ST_Geometry_Version() RETURNS text AS 'st_geometry', 'ST_Geometry_Version' LANGUAGE 'C' WITH (ISCACHABLE, ISSTRICT)