From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Osahon Oduware <osahon(dot)gis(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, postgis-users(at)lists(dot)osgeo(dot)org, lr(at)pcorp(dot)us |
Subject: | Re: Error During PostGIS Build From Source on Linux |
Date: | 2017-04-12 22:09:27 |
Message-ID: | 5bdb126d-355c-a04f-61a4-8d6aea79faa1@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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?
Well you need something to provide pg_config for the version of Postgres
you want to install Postgis on it. That could come from packaged version
as well as a source built version. In your case you showed already
building Postgres. From your previous post:
"Next I built PostgreSQL successfully from source as below:
./configure --prefix=/path/to/pgsql
make
make install"
I would say the order is:
1) A Postgres installation with pg_config, whether that is building from
source or installing a package.
2) Build GDAL using the pg_config from 1)
3) Build Postgis using the pg_config from 1) and gdalconfig from 2)
I don't use Postgis so this is just a best guess on my part. That is why
I initially suggested just using the Postgres Yum repos to install
Postgres and Postgis. Then the build process is taken care of for you.
>
>
> On Apr 12, 2017 19:24, "Adrian Klaver" <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)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(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org
> <mailto:pgsql-general(at)postgresql(dot)org>)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
> <http://www.postgresql.org/mailpref/pgsql-general>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Gavin Wahl | 2017-04-12 22:14:08 | SELECT FOR UPDATE violates READ COMMITTED isolation? |
Previous Message | Osahon Oduware | 2017-04-12 21:37:03 | Re: Error During PostGIS Build From Source on Linux |