Problem installing basemap

Hi, I previously installed basemap by using the yum command. This installed version 0.99.4. I want to install the latest version but am having some problems. My system info is,

[davcra@David basemap-1.0.1]$ uname -a
Linux David 3.3.0-4.fc16.i686 #1 SMP Tue Mar 20 18:45:14 UTC 2012 i686 i686 i386 GNU/Linux

yum doesnt seem to find the latest version so I have been following some instructions from

http://matplotlib.github.com/basemap/users/installing.html

. I downloaded the latest version and untarred it. Then in the basemap directory (which contains geos-3.2.0) I try to set the environment variable GEOS_DIR to point to the location of libgeos_c and geos_c.h.
I use the find command to locate the files,

find / -name geos_c.h

returns the location of that file as

/usr/lib/basemap-1.0.1/geos-3.2.0/capi/geos_c.h

and

find / -name libgeos*

returns

/libgeos_c_la-geos_c.Plo
/usr/lib/libgeos-3.3.1.so
/usr/lib/libgeos_c.so.1.7.1
/usr/lib/libgeos_c.so.1

so I set GEOS_DIR to /usr/lib.
I then cd to the basemap directory and run,
python setup.py install but get the following error,

[davcra@David basemap-1.0.1]$ sudo python setup.py install
[sudo] password for davcra: 
checking for GEOS lib in /root ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
checking for GEOS lib in /sw ....
checking for GEOS lib in /opt ....
checking for GEOS lib in /opt/local ....

Can't find geos library . Please set the
environment variable GEOS_DIR to point to the location
where geos is installed (for example, if geos_c.h
is in /usr/local/include, and libgeos_c is in /usr/local/lib,
set GEOS_DIR to /usr/local), or edit the setup.py script
manually and set the variable GEOS_dir (right after the line
that says "set GEOS_dir manually here".

It doesnt like the environment variable so can I just move geos_c.h to /usr/lib or will that mess things up altogether??
Thanks,
D

  • try this:
$  export GEOS_DIR

HTH

good luck, and success !
_____________
alexandre botao

Hi again,
I had already tried export but it didnt work (although echo $GEOS_DIR returned the correct path). I set it manually in the setup file and it seems to work, but it still couldnt find geos_c.h, so I moved the geos directory to /usr/lib which seems to have worked. However now I get a different error, when I try to build geos-3.2.0
I cd to the geos dir and

sudo ./configure --prefix=$GEOS_DIR

which seems to go ok. Then

sudo make; make install

but this gives the following,

make[4]: Entering directory `/usr/lib/geos-3.2.0'
make[4]: Leaving directory `/usr/lib/geos-3.2.0'
/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../source/headers -I../../source/headers/geos -I../../source/headers     -g -O2 -DGEOS_INLINE  -pedantic -Wall -ansi -Wno-long-long  -ffloat-store -MT CoordinateSequenceFactory.lo -MD -MP -MF .deps/CoordinateSequenceFactory.Tpo -c -o CoordinateSequenceFactory.lo CoordinateSequenceFactory.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../source/headers -I../../source/headers/geos -I../../source/headers -g -O2 -DGEOS_INLINE -pedantic -Wall -ansi -Wno-long-long -ffloat-store -MT CoordinateSequenceFactory.lo -MD -MP -MF .deps/CoordinateSequenceFactory.Tpo -c CoordinateSequenceFactory.cpp  -fPIC -DPIC -o .libs/CoordinateSequenceFactory.o
cc1plus: error: /usr/local/include: Permission denied
make[3]: *** [CoordinateSequenceFactory.lo] Error 1
make[3]: Leaving directory `/usr/lib/geos-3.2.0/source/geom'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/lib/geos-3.2.0/source/geom'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/lib/geos-3.2.0/source'
make: *** [install-recursive] Error 1

Anyone know whats happening????:wall:
thanks
D