[postgis-devel] ERROR: could not load library "/usr/local/pgsql/lib/liblwgeom.so.1.1": /usr/local/lib/libgeos_c.so.1: undefined symbol: _ZN4geos9WKBReader4readERSi

Chris Hodgson chodgson at refractions.net
Wed Jun 28 11:37:10 PDT 2006


First of all this is probably a better question for the postgis-users 
list, as it is about using postgis, not developing it. However, I won't 
let that stop me from trying to help you.

You seem to have two different versions of geos installed. The problem 
with this is that because of the way they are installed, and the way 
your system is configured (which is standard) your NEW geos_c library is 
linking to your OLD geos library.

By default in most linux distro's, /usr/lib is checked before 
/usr/local/lib, so, since your older geos is installed in /usr/lib, it 
gets chosen at run-time. So removing it is probably a good option. That 
means all three files - not sure if you did that or not...

Was mapserver compiled with geos support as well? Was it linked against 
the old version? Do an ldd on mapserv to see. You may need to recompile 
mapserver. Also, what do those two ldd's you show look like after 
removing the old geos library? No missing links, hopefully?

I hope that helps a bit!

Chris

GIS Nick wrote:
> Hi there,
> 
> I have been trying to get postgis working with mapserver.  I 
> successfully installed postgis, loaded the  sql  scripts  (lwpostgis and 
> spatial_ref) and successfully loaded a shp file into the database.
> 
> However when I subsequently try to access the database through a .map 
> file I get the following error:
> 
> Postgresql reports the error as 'ERROR: could not load library 
> "/usr/local/pgsql/lib/liblwgeom.so.1.1": /usr/local/lib/libgeos_c.so.1: 
> undefined symbol: _ZN4geos9WKBReader4readERSi '
> 
> I found a similar query from this thread here:  
> "http://postgis.refractions.net/pipermail/postgis-devel/2006-January/001957.html" 
> which explained that it may be necessary to remove the libgeos.so.2 from 
> /usr/lib.
> 
> I did this and mapserver just gives me a 505 Internal Error.
> 
> The result of
> 
> ldd /usr/local/pgsql/lib/liblwgeom.so.1.1 /usr/local/lib/libgeos_c.so.1
> 
> is:
> 
> /usr/local/pgsql/lib/liblwgeom.so.1.1:
>        linux-gate.so.1 =>  (0xffffe000)
>        libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0xb7e95000)
>        libproj.so.0 => /usr/local/lib/libproj.so.0 (0xb7e60000)
>        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d32000)
>        libgeos.so.2 => /usr/lib/libgeos.so.2 (0xb7bf0000)
>        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7b09000)
>        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ae6000)
>        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7adb000)
>        /lib/ld-linux.so.2 (0x80000000)
> /usr/local/lib/libgeos_c.so.1:
>        linux-gate.so.1 =>  (0xffffe000)
>        libgeos.so.2 => /usr/lib/libgeos.so.2 (0xb7dd5000)
>        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7cef000)
>        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ccc000)
>        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b9e000)
>        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7b92000)
>        /lib/ld-linux.so.2 (0x80000000)
> 
> 
> in /usr/lib/ I have :
> 
> libgeos.so
> libgeos.so.2
> libgeos.so.2.1.1
> 
> 
> in /usr/local/lib I have :
> 
> libgeos.so
> libgeos.so.2
> libgeos.so.2.2.2
> 
> 
> What the hell is going on???
> 
> You may have gathered that I am a fully-fledged newbie in 
> postgis/mapserver etc and a (relatively) newbie in Linux.
> 
> I would really appreciate any help you can give me here
> 
> Thanks,
> 
> Nick
> 
> 
> 
> 
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel




More information about the postgis-devel mailing list