<div dir="ltr"><div><div><div><div>Hi Adrian,<br><br></div>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:<br></div>CREATE EXTENSION postgis;<br><br></div>I get the following error:<br>ERROR: could not load library "/path/to/postgresql/lib/<a href="http://postgis-2.3.so" target="_blank">postg<wbr>is-2.3.so</a>": /path/to/postgresql/lib/<a href="http://postgis-2.3.so" target="_blank">postgi<wbr>s-2.3.so</a>: undefined symbol: GEOSClipByRect<br><br></div>Please, do you have any idea what I might be doing wrong?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 13, 2017 at 3:40 AM, Osahon Oduware <span dir="ltr"><<a href="mailto:osahon.gis@gmail.com" target="_blank">osahon.gis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi Adrian,<div dir="auto"><br></div><div dir="auto">I will try this and get back to you. Thanks a lot for your help.</div><div><div class="h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Apr 12, 2017 23:45, "Adrian Klaver" <<a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.com</a>> wrote:<br type="attribution"><blockquote class="m_4597945408076977945quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_4597945408076977945quoted-text">On 04/12/2017 02:37 PM, Osahon Oduware wrote:<br>
</div><div class="m_4597945408076977945quoted-text"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Adrian,<br>
<br>
Thanks for your response. From the solution you provided, does it mean I<br>
have to build PostgreSQL first from source, before building GDAL from<br>
source?<br>
</blockquote>
<br></div>
Alright did a test run of the build.<br>
<br>
I installed the dev packages for GEOS and Proj from packages and I already had the xml2 dev libraries.<br>
<br>
I built GDAL using the pg_config from my source install of Postgres.<br>
<br>
So when building Postgis after building GDAL  I had to do:<br>
<br>
--with-gdalconfig=/path/to/gda<wbr>l/bin/gdal_config<br>
<br>
to get it to see the config file and not throw an error. Then Postgis built.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_4597945408076977945quoted-text">
<br>
<br>
On Apr 12, 2017 19:24, "Adrian Klaver" <<a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.com</a><br></div><div class="m_4597945408076977945elided-text">
<mailto:<a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.<wbr>com</a>>> wrote:<br>
<br>
    On 04/12/2017 11:11 AM, Rob Sargent wrote:<br>
<br>
<br>
<br>
        On 04/12/2017 12:01 PM, Adrian Klaver wrote:<br>
<br>
            On 04/12/2017 10:14 AM, Osahon Oduware wrote:<br>
<br>
                Hi All,<br>
<br>
                I am working on a Linux OS (Centos 6.5). I built GDAL<br>
                successfully from<br>
                source as below:<br>
                ./configure --prefix=/path/to/gdal<br>
                make<br>
                make install<br>
<br>
                Next I built PostgreSQL successfully from source as below:<br>
                ./configure --prefix=/path/to/pgsql<br>
                make<br>
                make install<br>
<br>
                I attempted to configure PostGIS from source as below:<br>
                ./configure --with-pgconfig=/home/path/to/<br>
                pg_config --with-gdalconfig=/path/to/gda<wbr>l<br>
                --with-geosconfig=/path/to/geo<wbr>s-config<br>
                --with-xml2config=/path/to/xml<wbr>2-config<br>
                --with-projdir=/path/to/proj<br>
                --with-gui --with-raster --with-topology<br>
<br>
                but I get the following error:<br>
                configure: error: PostGIS raster requires OGR to be<br>
                enabled in GDAL. Use<br>
                --without-raster to build without raster support.<br>
<br>
                I sure need the raster support to be enabled in PostGIS.<br>
                Could anyone<br>
                help me out with this.<br>
<br>
<br>
<br>
            Use the Postgres YUM repos:<br>
<br>
            <a href="https://www.postgresql.org/download/linux/redhat/" rel="noreferrer" target="_blank">https://www.postgresql.org/dow<wbr>nload/linux/redhat/</a><br>
            <<a href="https://www.postgresql.org/download/linux/redhat/" rel="noreferrer" target="_blank">https://www.postgresql.org/do<wbr>wnload/linux/redhat/</a>><br>
<br>
        Been  years since I did this but you could (re)build GDAL with<br>
        OGR as<br>
        requested in the error message.<br>
<br>
<br>
    Did a little digging into this and the magic sauce seems to be:<br>
<br>
    --with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to<br>
                              pg_config)<br>
<br>
<br>
    So something like:<br>
<br>
    ./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_con<wbr>fig<br>
<br>
    which on my machine got, among other things:<br>
<br>
    PostgreSQL support:        yes<br>
<br>
        rjs<br>
<br>
<br>
<br>
<br>
    --<br>
    Adrian Klaver<br></div>
    <a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.com</a> <mailto:<a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.<wbr>com</a>><div class="m_4597945408076977945quoted-text"><br>
<br>
<br>
<br>
    --<br>
    Sent via pgsql-general mailing list (<a href="mailto:pgsql-general@postgresql.org" target="_blank">pgsql-general@postgresql.org</a><br></div>
    <mailto:<a href="mailto:pgsql-general@postgresql.org" target="_blank">pgsql-general@postgres<wbr>ql.org</a>>)<div class="m_4597945408076977945quoted-text"><br>
    To make changes to your subscription:<br>
    <a href="http://www.postgresql.org/mailpref/pgsql-general" rel="noreferrer" target="_blank">http://www.postgresql.org/mail<wbr>pref/pgsql-general</a><br></div>
    <<a href="http://www.postgresql.org/mailpref/pgsql-general" rel="noreferrer" target="_blank">http://www.postgresql.org/mai<wbr>lpref/pgsql-general</a>><br>
<br>
<br><font color="#888888">
</font></blockquote><font color="#888888">
<br>
<br>
-- <br>
Adrian Klaver<br>
<a href="mailto:adrian.klaver@aklaver.com" target="_blank">adrian.klaver@aklaver.com</a><br>
</font></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>