[postgis-devel] Error: GDAL Python bindings required

Emilio de Torres Fernández emilio.detorres at fueca.es
Tue Apr 12 02:21:13 PDT 2011


Hello,

I'm trying to compile Postgis Raster 2.0 in a Red Hat Linux Enterprise 6
but I get the following error when I execute ./configure --with-raster:

...
checking for GDAL Python bindings... not found
configure: error: GDAL Python bindings required by raster2pgsql.py
loader

When I installed GDAL I executed ./configure --with-python and I got the
following lines:

...
checking for python bindings... checking for python... python
checking for location of Python Makefiles... found
checking where to install Python
modules... /usr/lib/python2.6/site-packages
enabled
checking for python setuptools... found
...
SWIG Bindings:          python 
...

If I execute Python from a console and import GDAL I get:

>>> from osgeo import
gdal                                                                                                                                             
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/usr/lib/python2.6/site-packages/GDAL-1.8.0-py2.6-linux-i686.egg/osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File
"/usr/lib/python2.6/site-packages/GDAL-1.8.0-py2.6-linux-i686.egg/osgeo/__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: libgdal.so.1: cannot open shared object file: No such file
or directory


What am I doing wrong?

I have numPy installed. I attach the the gdal and the postgis configure.


Best regards.
-- 
Emilio de Torres Fernández

Fundación Universidad Empresa de la provincia de Cádiz 
emilio.detorres at fueca.es
Teléfono: 0034-956-015381
Edificio Consorcio Tecnológico de Cádiz.
C/Benito Pérez Galdós s/n.
11002 Cádiz
SPAIN




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110412/c53be74f/attachment.html>
-------------- next part --------------
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking if g++ supports -Wall... yes
checking if g++ supports -Wmissing-prototypes... yes
checking if g++ supports -ffloat-store... yes
checking for flex... no
checking for lex... no
checking for yywrap in -lfl... no
checking for yywrap in -ll... no
checking for bison... no
checking for byacc... no
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for vasprintf... yes
checking for asprintf... yes
checking for convert... no
checking for xsltproc... /usr/bin/xsltproc
checking for dblatex... no
checking CUnit/CUnit.h usability... no
checking CUnit/CUnit.h presence... no
checking for CUnit/CUnit.h... no
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... yes
checking for iconvctl... no
checking for libiconvctl... no
checking for pg_config... /usr/local/pgsql/bin/pg_config
checking PostgreSQL version... PostgreSQL 9.0.3
checking libpq-fe.h usability... yes
checking libpq-fe.h presence... yes
checking for libpq-fe.h... yes
checking for PQserverVersion in -lpq... yes
checking for xml2-config... /usr/local/bin/xml2-config
checking libxml/tree.h usability... yes
checking libxml/tree.h presence... yes
checking for libxml/tree.h... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
checking libxml/xpath.h usability... yes
checking libxml/xpath.h presence... yes
checking for libxml/xpath.h... yes
checking libxml/xpathInternals.h usability... yes
checking libxml/xpathInternals.h presence... yes
checking for libxml/xpathInternals.h... yes
checking for xmlInitParser in -lxml2... yes
checking for geos-config... /usr/local/bin/geos-config
checking GEOS version... 3.2.2
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for initGEOS in -lgeos_c... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking proj_api.h usability... yes
checking proj_api.h presence... yes
checking for proj_api.h... yes
checking for pj_get_release in -lproj... yes
RASTER: Raster support requested
checking for GDAL >= 1.6.0... found
checking for GDAL Python bindings... not found
-------------- next part --------------
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking C_WFLAGS for maximum warnings... -Wall -Wdeclaration-after-statement
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking CXX_WFLAGS for maximum warnings... -Wall
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking for ANSI C header files... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking whether byte ordering is bigendian... no
checking for 64bit integer type... long long
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking size of int... 4
checking size of unsigned long... 4
checking size of void*... 4
checking for int8... no
checking for int16... no
checking for int32... no
checking native cpu bit order... lsb2msb
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for strtof... yes
checking for getcwd... yes
checking whether strtof is declared... yes
checking for readlink... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking for setlocale... yes
checking to enable debug build... no, CFLAGS="-g -O2"
checking whether GCC 4.1 atomic builtins are available... yes
checking whether we should hide internal symbols... no
checking for local include/lib path... none
checking for pthread_create in -lpthread... yes
checking for PTHREAD_MUTEX_RECURSIVE... yes
checking for deflateInit_ in -lz... yes
checking for inflateCopy in -lz... yes
using pre-installed libz
checking for pg_config... no
checking for PostgreSQL... no
checking for G_gisinit_2 in -lgrass5... no
checking for ffopen in -lcfitsio... no
libcfitsio not found - FITS support disabled
checking for Mopen in -lcsf... no
checking csf.h usability... no
checking csf.h presence... no
checking for csf.h... no
using internal csf code.
checking for nc_open in -lnetcdf... no
libnetcdf not found - netCDF support disabled
checking for libpng... checking for png_set_IHDR in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
using pre-installed libpng.
checking for PCIDSK... using internal libpcidsk.
checking for libtiff... checking for TIFFScanlineSize64 in -ltiff... no
using internal TIFF code.
BigTIFF support enabled.
using internal GeoTIFF code.
checking for jpeg_read_scanlines in -ljpeg... no
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
using internal jpeg code.
checking for jpeg12... enabled
checking for DGifOpenFileName in -lgif... no
using internal gif code.
checking ecs.h usability... no
checking ecs.h presence... no
checking for ecs.h... no
checking for FMEObjects... no
checking for SDreaddata in -lmfhdfalt... no
checking for SDreaddata in -lmfhdf... no
checking for SDreaddata in -lhdf4... no
checking for SDreaddata in -lmfhdf... no
checking for SDreaddata in -lmfhdf... no
checking for H5Fopen in -lhdf5... no
checking for jpc_decode in -ljasper... no
checking for jp2_decode in -ljasper... no
checking for pgx_decode in -ljasper... no
checking for opj_decode_tile_data in -lopenjpeg... no
checking openjpeg.h usability... no
checking openjpeg.h presence... no
checking for openjpeg.h... no
checking for NCScbmOpenFileView in -lNCSEcw... no
checking for NCScbmOpenFileView in -lecwj2... no
checking for Kakadu JPEG2000 support... not requested.
configure: MrSID support disabled.
configure: MrSID/MG4 Lidar support disabled.
checking for MSG... not requested
checking for BSB... enabled
checking if Oracle support is enabled... no
checking for GRIB... enabled
checking for OGR ... enabled
checking for MySQL... no
checking for Ingres... no
checking for Xerces C++ Parser... no
checking for Expat XML Parser... no
checking for Google libkml... no
checking for SQLConnect in -lodbc... no
checking for SQLInstallDriverEx in -lodbcinst... no
checking if Oracle support is enabled... no
checking Checking for DODS... disabled
checking for curl-config... no
disabled
checking for SQLite3 library >= 3.0.0... disabled
checking Checking for DWGdirect... disabled
configure: IBM Informix DataBlade not supported.
configure: checking whether we should include ESRI SDE support...
        ESRI SDE support not requested.
checking for VFK support... yes
checking for geos-config... /usr/local/bin/geos-config
checking for GEOS version >= 2.2.0... yes
checking for GEOSversion in -lgeos_c... yes
configure: Using C API from GEOS 3.2.2
checking for OpenCL support... no
checking whether to enable PAM... yes
checking for poppler... disabled
checking how to link PROJ.4 library... link dynamically.
checking GDAL version information from gdal_version.h: 1.8.0
checking for perl bindings... disabled
checking for php bindings... disabled
checking for ruby bindings... disabled
checking for python bindings... checking for python... python
checking for location of Python Makefiles... found
checking where to install Python modules... /usr/lib/python2.6/site-packages
enabled
checking for python setuptools... found
configure: checking whether we should include rasdaman support...
        rasdaman support not requested.
configure: creating ./config.status
config.status: creating GDALmake.opt
config.status: creating port/cpl_config.h
config.status: port/cpl_config.h is unchanged
config.status: executing libtool commands

GDAL is now configured for i686-pc-linux-gnu

  Installation directory:    /usr/local
  C compiler:                gcc -g -O2
  C++ compiler:              g++ -g -O2

  LIBTOOL support:           yes

  LIBZ support:              external
  LIBLZMA support:           no
  GRASS support:             no
  CFITSIO support:           no
  PCRaster support:          internal
  NetCDF support:            no
  LIBPNG support:            external
  LIBTIFF support:           internal (BigTIFF=yes)
  LIBGEOTIFF support:        internal
  LIBJPEG support:           internal
  8/12 bit JPEG TIFF:        yes
  LIBGIF support:            internal
  OGDI support:              no
  HDF4 support:              no
  HDF5 support:              no
  Kakadu support:            no
  JasPer support:            no
  OpenJPEG support:          no
  ECW support:               no
  MrSID support:             no
  MrSID/MG4 Lidar support:   no
  MSG support:               no
  GRIB support:              yes
  EPSILON support:           no
  cURL support (wms/wcs/...):no
  PostgreSQL support:        no
  MySQL support:             no
  Ingres support:            no
  Xerces-C support:          no
  NAS support:               no
  Expat support:             no
  Google libkml support:     no
  ODBC support:              no
  PGeo support:              no
  PCIDSK support:            internal
  OCI support:               no
  GEORASTER support:         no
  SDE support:               no
  Rasdaman support:          no
  DODS support:              no
  SQLite support:            no
  SpatiaLite support:        no
  DWGdirect support          no
  INFORMIX DataBlade support:no
  GEOS support:              yes
  VFK support:               yes
  Poppler support:           no
  OpenCL support:            no


  SWIG Bindings:          python 

  Statically link PROJ.4:    no
  enable OGR building:       yes
  enable pthread support:    yes
  hide internal symbols:     no



More information about the postgis-devel mailing list