I had my worst nightmare while installing Postgis 2.X on SLES 12 SP1. which doesnt have compatible package in zypper repo
Here is how is resolved it on my Postgres server instance running 9.4.X
**Prerequsite packages which i have installed prior to PostGis based on the errors**
Proj 4 Download source cold, Build --> make install
install Gdal andjibson by adding zypper repo zypper addrepo
[To see links please register here]
zypper install gdal gdal-devel libjson-c-devel libjson
**Installing Postgis**
Download postgis source code (
[To see links please register here]
)
Go to Postgis folder
./configure --with-pgconfig=/usr/lib/postgresql94/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config
make
make install
now if you goto postgress DB and create extension postgis; it will work
**Important** while configuring you should specify pg-config path and geosconfig path and You SHOULD NOT include "without Raster" as RASTER plays main role in creating the postgis extension