[postgis-users] install postgis 2 linux

Peter N. Schweitzer pschweitzer at usgs.gov
Sat Sep 22 14:39:27 PDT 2012


On 09/22/2012 03:42 PM, Icadedt wrote:
> i would like to install postgis 2 in linux centos 6
>
> my source folder is /usr/local/postgis-2.0.1
>
> when i execute ./configure , the return message is :
>
> checking for geos-config... no
> configure: error: could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.
>
>
> my geos-config file is in /usr/local/geos-3.3.3/tools, so i execute
> ./configure --with-geosconfig=/usr/local/geos-3.3.5/tools/geos-config
>
> but i have this error message:
> Using user-specified geos-config file: /usr/local/geos-3.3.3/tools/geos-config
> checking GEOS version... 3.3.3
> checking geos_c.h usability... no
> checking geos_c.h presence... no
> checking for geos_c.h... no
> configure: error: could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig
>
>
>
>
> Please help me , thanks in advance

Do you have two versions of GEOS on your system?  It looks like you may
have installed 3.3.3 and then also 3.3.5; perhaps this is confusing to
the configure script.

I do this by compiling each of the libraries in /usr/local/src/library-name,
so first I download the latest source, unpack them in /usr/local/src, and
build from there, like this:

cd /usr/local/src
tar xzf ~/proj-4.8.0.tar.gz
cd proj-4.8.0
./configure
make
make install
/sbin/ldconfig

With the default configure, it may help to have a file
named /etc/ld.so.conf.d/local.conf
containing the one line
/usr/local/lib

then

cd /usr/local/src
tar xjf ~/geos-3.3.5.tar.bz2
cd geos-3.3.5
./configure
make
make install
/sbin/ldconfig

and

cd /usr/local/src
tar xzf ~/gdal-1.9.1.tar.gz
cd gdal-1.9.1
./configure
make
make install
/sbin/ldconfig

then install PostGIS the same way.

Peter
-- 
Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  FAX: (703) 648-6252  email:pschweitzer at usgs.gov
<http://geology.usgs.gov/peter/>



More information about the postgis-users mailing list