[GRASSLIST:120] Re: Getting started with postgresql and GRASS

Michael Ash mash at econs.umass.edu
Wed May 21 16:45:18 EDT 2003


I have been running GRASS 5.0.0 with postgresql successfully
on Linux, but I just upgraded to 5.0.2 by downloading the
binary from http://grass.ibiblio.org.  Unfortunately, the
GRASS/postgresql connection stopped working after the
upgrade. (When I revert to 5.0.0, GRASS/postgresql works
again.) The problem appears to be shared libraries.

GRASS:~ > g.select.pg -l
g.select.pg: error while loading shared libraries: libpq.so.2: cannot load shared object file: No such file or directory

GRASS:~ > locate libpq.so.2
GRASS:~ >

Unlike the previous time (see the effective advice of Glynn
Clements below), when my problem was that I had not informed
the loader of the nonstandard location of the library, I do
not seem to have libpq.so.2 on my system.  Is it necessary
to have libpq.so.2?  Can libpq.so.3, which I do have (again,
see below), substitute?

I would be grateful for advice.

Best regards,

Michael Ash




> Michael Ash wrote:
>
> > GRASS:~ > g.select.pg -l
> > g.select.pg: error while loading shared libraries: libpq.so: cannot load shared object file: No such file or directory
>
> > GRASS:~ > locate libpq.so
> > /usr/local/pgsql/lib/libpq.so.3
> > /usr/local/pgsql/lib/libpq.so.3.0
> > /usr/local/pgsql/lib/libpq.so
>
> If you put shared libraries in a non-standard location (i.e. anywhere
> other than /lib and /usr/lib), you have to tell the loader. E.g.:
>
> 	LD_LIBRARY_PATH=/usr/local/pgsql/lib
> 	export LD_LIBRARY_PATH
>
> Or, if LD_LIBRAY_PATH is already defined:
>
> 	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
> 	export LD_LIBRARY_PATH
>
> Or add /usr/local/pgsql/lib to /etc/ld.so.conf then run "ldconfig".
>
> The ld.so(8) man page might have useful information (or it might just
> be hopelessly out of date; any references to a.out are ancient
> history).
>
> --
> Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list