[postgis-users] Error running lwpostgis.sql
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Thu Dec 21 02:01:39 PST 2006
On Thu, 2006-12-21 at 09:22 +0100, Kis János Tamás wrote:
> 2006. December 19. 16.03 dátummal Devrim GUNDUZ ezt írta:
> > Hi,
> >
> > On Tue, 2006-12-19 at 12:09 +0100, Kis János Tamás wrote:
> > > ERROR: incompatible library
> > > "/usr/local/pgsql/lib/liblwgeom.so.1.2": missing magic block
> > > HINT: Extension libraries are required to use the
> > > PG_MODULE_MAGIC
> >
> > AFAIK you need to recompile PostGIS for PostgreSQL 8.2.0.
> >
> > Regards,
>
> #:cd /usr/src/proj-4.4.9/
> #:./configure --enable-FEATURE=yes && make && make install
> DONE!
>
> #:cd /usr/src/geos-2.2.3/
> #:./configure --enable-FEATURE=yes && make && make install
> DONE!
>
> #:cd /usr/src/postgresql-8.2.0/
> #:./configure --enable-nls='hu us en' --with-perl --with-python
> --with-tcl --with-openssl --with-pam --enable-thread-safety && make
> && make install
> DONE!
>
> #:cd /usr/src/postgresql-8.2.0/contrib/postgis/
> #:./configure --with-pgsql=/usr/local/pgsql/bin/pg_config
> --with-geos=/usr/local/bin/geos-config --with-proj=/usr/local
>
> SUMMARY
> -------------------------------------------------------
>
> HOST_OS: linux-gnu
>
> PGSQL: /usr/local/pgsql/bin/pg_config
> GEOS: /usr/local/bin/geos-config (with C-API)
> (ldflags: -L/usr/local/lib)
> PROJ: prefix=/usr/local libdir=/usr/local/lib
> ICONV: 1
>
> PORTNAME: linux
> PREFIX: /usr/local/pgsql
> EPREFIX: ${prefix}
> DOC: /usr/local/pgsql/doc/contrib
> DATA: ${datarootdir}
> MAN: ${datarootdir}/man
> BIN: /usr/local/pgsql/bin
> EXT: /usr/local/pgsql/lib (\$$libdir)
> -------------------------------------------------------
>
> #: make && make install
> DONE!
>
> # ls -laF /usr/local/pgsql/lib/liblw*
> lrwxrwxrwx 1 root staff 16 Dec 21
> 09:10 /usr/local/pgsql/lib/liblwgeom.so -> liblwgeom.so.1.2*
> lrwxrwxrwx 1 root staff 16 Dec 21
> 09:10 /usr/local/pgsql/lib/liblwgeom.so.1 -> liblwgeom.so.1.2*
> -rwxr-xr-x 1 root staff 1580679 Dec 21
> 09:10 /usr/local/pgsql/lib/liblwgeom.so.1.2*
>
> #:/usr/src/postgresql-8.2.0/contrib/postgis# psql -U postgres -h
> localhost gis < lwpostgis.sql
> BEGIN
> NOTICE: type "histogram2d" is not yet defined
> DETAIL: Creating a shell type definition.
> ERROR: incompatible library "/usr/local/pgsql/lib/liblwgeom.so.1.2":
> missing magic block
> HINT: Extension libraries are required to use the PG_MODULE_MAGIC
> macro.
> ERROR: current transaction is aborted, commands ignored until end of
> transaction block
> ...
>
> I'm sorry, but I don't understand, what I made wrong...
> Maybe I need to upgrade source of the geos(2.2.3) and the proj(4.4.9)?
>
> Thanks,
> kjt
Hi kjt,
Can you check the output of /usr/local/bin/pg_config --version? If it
returns 8.2, then have you tried adding /usr/local/pgsql/lib
to /etc/ld.so.conf, running ldconfig and then trying to load
lwpostgis.sql?
Kind regards,
Mark.
More information about the postgis-users
mailing list