Hi Adrian, I followed the step you provided and the installation was successful. However, I created a test database and when I try to create a postgis extension in the test database using: CREATE EXTENSION postgis;
I get the following error: ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so": /path/to/postgresql/lib/postgis-2.3.so: undefined symbol: GEOSClipByRect Please, do you have any idea what I might be doing wrong? On Thu, Apr 13, 2017 at 3:40 AM, Osahon Oduware <osahon....@gmail.com> wrote: > Hi Adrian, > > I will try this and get back to you. Thanks a lot for your help. > > > On Apr 12, 2017 23:45, "Adrian Klaver" <adrian.kla...@aklaver.com> wrote: > > On 04/12/2017 02:37 PM, Osahon Oduware wrote: > >> Hi Adrian, >> >> Thanks for your response. From the solution you provided, does it mean I >> have to build PostgreSQL first from source, before building GDAL from >> source? >> > > Alright did a test run of the build. > > I installed the dev packages for GEOS and Proj from packages and I already > had the xml2 dev libraries. > > I built GDAL using the pg_config from my source install of Postgres. > > So when building Postgis after building GDAL I had to do: > > --with-gdalconfig=/path/to/gdal/bin/gdal_config > > to get it to see the config file and not throw an error. Then Postgis > built. > > > > >> >> On Apr 12, 2017 19:24, "Adrian Klaver" <adrian.kla...@aklaver.com >> <mailto:adrian.kla...@aklaver.com>> wrote: >> >> On 04/12/2017 11:11 AM, Rob Sargent wrote: >> >> >> >> On 04/12/2017 12:01 PM, Adrian Klaver wrote: >> >> On 04/12/2017 10:14 AM, Osahon Oduware wrote: >> >> Hi All, >> >> I am working on a Linux OS (Centos 6.5). I built GDAL >> successfully from >> source as below: >> ./configure --prefix=/path/to/gdal >> make >> make install >> >> Next I built PostgreSQL successfully from source as below: >> ./configure --prefix=/path/to/pgsql >> make >> make install >> >> I attempted to configure PostGIS from source as below: >> ./configure --with-pgconfig=/home/path/to/ >> pg_config --with-gdalconfig=/path/to/gdal >> --with-geosconfig=/path/to/geos-config >> --with-xml2config=/path/to/xml2-config >> --with-projdir=/path/to/proj >> --with-gui --with-raster --with-topology >> >> but I get the following error: >> configure: error: PostGIS raster requires OGR to be >> enabled in GDAL. Use >> --without-raster to build without raster support. >> >> I sure need the raster support to be enabled in PostGIS. >> Could anyone >> help me out with this. >> >> >> >> Use the Postgres YUM repos: >> >> https://www.postgresql.org/download/linux/redhat/ >> <https://www.postgresql.org/download/linux/redhat/> >> >> Been years since I did this but you could (re)build GDAL with >> OGR as >> requested in the error message. >> >> >> Did a little digging into this and the magic sauce seems to be: >> >> --with-pg=ARG Include PostgreSQL GDAL/OGR Support (ARG=path >> to >> pg_config) >> >> >> So something like: >> >> ./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config >> >> which on my machine got, among other things: >> >> PostgreSQL support: yes >> >> rjs >> >> >> >> >> -- >> Adrian Klaver >> adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com> >> >> >> >> >> -- >> Sent via pgsql-general mailing list (pgsql-general@postgresql.org >> <mailto:pgsql-general@postgresql.org>) >> >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-general >> <http://www.postgresql.org/mailpref/pgsql-general> >> >> >> > > -- > Adrian Klaver > adrian.kla...@aklaver.com > > >