[postgis-users] Problems while loading lwpostgis.sql... Please provide your inputs / help

ahmadbasha.shaik at wipro.com ahmadbasha.shaik at wipro.com
Wed Jan 30 05:11:23 PST 2008


Hi 
 
I am facing problems while loading lwpostgis.sql in PostGIS. Below is a
detailed explanation.
psql -d test -f /usr/share/lwpostgis.sql
 
/***********************************************************************
*******/
ERROR:  could not access file "$libdir/liblwgeom.so.1.2": No such file
or directory
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
/***********************************************************************
*******/
 
Hence , I tried creating a simple test.sql which has the create replace
functions for histogram. I have detailed the environmnent that we are 
using, the statement of lwpostgis.sql we executed and the error
encountered 
 
Environment:
============
Operationg System : Red Hat Linux 3.4.5-2
Database : PostgreSQL 8.2.6 
Extensions : geos-3.0.0, proj-4.6.0, postgis-1.2.1
 
test.sql (three sql commands that I have taken from lwpostgis.sql to
check)
========

BEGIN;
 
CREATE OR REPLACE FUNCTION histogram2d_in(cstring)
        RETURNS histogram2d
        AS '$libdir/liblwgeom.so.1.2', 'lwhistogram2d_in'
        LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
 
CREATE OR REPLACE FUNCTION histogram2d_out(histogram2d)
        RETURNS cstring
        AS '$libdir/liblwgeom.so.1.2', 'lwhistogram2d_out'
        LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
 
CREATE TYPE histogram2d (
        alignment = double,
        internallength = variable,
        input = histogram2d_in,
        output = histogram2d_out,
        storage = main
);
 
COMMIT;
 
 
ERROR Encountered
================
 
BEGIN
psql:test.sql:6: NOTICE:  type "histogram2d" is not yet defined
DETAIL:  Creating a shell type definition.
psql:test.sql:6: ERROR:  could not access file
"$libdir/liblwgeom.so.1.2": No such file or directory
psql:test.sql:11: ERROR:  current transaction is aborted, commands
ignored until end of transaction block
psql:test.sql:19: ERROR:  current transaction is aborted, commands
ignored until end of transaction block
ROLLBACK
 
Varions Options we tried:
==================
a) Changed the permissions $libdir i.e. /usr/lib/pgsl to 777
b) Hardcoded the path /usr/lib/pgsql in this test.sql
c) We also tried hardcoding the path /usr/lib/pgsql instead of $libdir
in lwpostgis.sql when we tried loading functions and types in
lwpostgis.sql
 

Can somebody please guide us or give directions what can be done. 
 
Regards
Ahmad

Please do not print this email unless it is absolutely necessary. Spread environmental awareness.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080130/34e61f78/attachment.html>


More information about the postgis-users mailing list