I am trying to import GeoTIFF file into spatially enabled PostgreSQL database. Using command:
raster2pgsql -s 4326 -C -F -a path/to/geotiff/file public.table_name | psql -d database_name -U postgres.
This commands is working absolutely fine in Windows (Postgres 9.1), but it is giving an error in linux (Redhat 7.2, Postgres 9.1/Postgres9.5). It gives the following error:
rt_raster_gdal_warp: could not create GDAL transformation object for output dataset creation context: SQL function "ST_transform" statement 1.
I have also tried setting PROJSO and PROJ_LIB environment variable with
but it is still not working.