[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: erro no postgis -> could not load library "/opt/pgsql/lib/postgis-1.5.so"



já estou com postgresql8.3 rodando instalado via apt-get install

o postgresql8.4 no /opt/pgsql
e o postgresql9.0.rc1 /opt/pgsql9rc1

e todos com postgis...e portas diferentes...então tenho pois estou usando pra geo/gis.

no phppgadmin esta ate configurado os 3 postgresql listados lá.

hoje prestei mais atenção ao INSTALL do fonte.

----------------------------------------------------------------------------------------------------------------------------------

Post-Installation Setup

Shared Libraries

   On some systems with shared libraries you need to tell the system how
   to find the newly installed shared libraries. The systems on which this
   is *not* necessary include BSD/OS, FreeBSD, HP-UX, IRIX, Linux, NetBSD,
   OpenBSD, Tru64 UNIX (formerly Digital UNIX), and Solaris.

   The method to set the shared library search path varies between
   platforms, but the most widely-used method is to set the environment
   variable LD_LIBRARY_PATH like so: In Bourne shells ("sh", "ksh",
   "bash", "zsh"):
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH


   or in "csh" or "tcsh":
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib

   Replace /usr/local/pgsql/lib with whatever you set "--libdir" to in
   step 1. You should put these commands into a shell start-up file such
   as "/etc/profile" or "~/.bash_profile". Some good information about the
   caveats associated with this method can be found at
   http://xahlee.org/UnixResource_dir/_/ldpath.html.

   On some systems it might be preferable to set the environment variable
   LD_RUN_PATH *before* building.

   On Cygwin, put the library directory in the PATH or move the ".dll"
   files into the "bin" directory.

   If in doubt, refer to the manual pages of your system (perhaps "ld.so"
   or "rld"). If you later get a message like:
psql: error in loading shared libraries
libpq.so.2.1: cannot open shared object file: No such file or directory

   then this step was necessary. Simply take care of it then.

   If you are on BSD/OS, Linux, or SunOS 4 and you have root access you
   can run:
/sbin/ldconfig /usr/local/pgsql/lib

   (or equivalent directory) after installation to enable the run-time
   linker to find the shared libraries faster. Refer to the manual page of
   "ldconfig" for more information. On FreeBSD, NetBSD, and OpenBSD the
   command is:
/sbin/ldconfig -m /usr/local/pgsql/lib

   instead. Other systems are not known to have an equivalent command.

----------------------------------------------------------------------------------------------------------------------------------

alem disso tenho criado grupo e usuario pra rodar cada postgresql diferente:
groupadd pgsql9
useradd -g pgsql9 -s /bin/sh -d /opt/pgsql9rc1/ pgsql9


mas o chato é que fica com senha.... se colocar --disabled-password
useradd -g pgsql9 -s /bin/sh -d /opt/pgsql9rc1/ pgsql9 --disabled-password

seria o mais correto?


outra viagem que me veio a foi a seguinte:
-s /bin/sh por um /bin/pgsql9 com

LD_LIBRARY_PATH=/opt/pgsql9rc1/lib
export LD_LIBRARY_PATH

pra cada versão de postgresql e postgis que estou usando seria melhor? se colocar este caminhos de cada postgresql/postgis dentro do mesmo /bin/sh não pode ter risco de dar problemas com libs?

valeu pela respostas.

2010/9/18 Fabricio Cannini <fcannini@gmail.com>
On Saturday 18 September 2010 02:27:42 Sorocaos . wrote:
> instalei primeiro o postgresql8.4 e depois o postgis1.5, e todas lib ficou
> em /opt/pgsql/lib
>
> $ ls /opt/pgsql/lib/postgis*
> /opt/pgsql/lib/postgis-1.5.so
>
> esta lá mas se tento rodar um :
>
> pgsql@micro$ /opt/pgsql/bin/psql -f share/contrib/postgis-1.5/postgis.sql
> --port=5800 --host=localhost -d geomapas
>
>
> WARNING:  nonstandard use of \\ in a string literal at character 263
> HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
> FATAL:  database "pgsql" does not exist
> FATAL:  database "maas" does not exist
> *ERROR:  could not load library "/opt/pgsql/lib/postgis-1.5.so":
> /opt/pgsql/lib/postgis-1.5.so: undefined symbol: GEOSHausdorffDistance*
> STATEMENT:  CREATE OR REPLACE FUNCTION st_spheroid_in(cstring)
>                 RETURNS spheroid
>                 AS '$libdir/postgis-1.5','ellipsoid_in'
>                 LANGUAGE 'C' IMMUTABLE STRICT;
> ERROR:  current transaction is aborted, commands ignored until end of
> transaction block
> STATEMENT:  CREATE OR REPLACE FUNCTION st_spheroid_out(spheroid)
>                 RETURNS cstring
>
>
> tenho que fazer
>
> ldconfig /opt/pgsql/lib
>
> pra rodar ok?
>
> como faço que lib que estão ali seja usadas perfeitamente?
>
> isso esta sobre um debian lenny.

Opa tchê, tudo beleza?

Tens algum motivo em específico pra não usar o postgresql 8.4 e o postgis 1.5
do repositório "lenny-backports" ?

http://packages.debian.org/lenny-backports/postgis
http://packages.debian.org/lenny-backports/postgresql

Sobre esse erro, já tentou editar o arquivo '/etc/ld.so.conf', colocar o
diretório '/opt/pgsql/lib' e depois rodar o ldconfig de novo?

[ ]'s e boa sorte.


--
To UNSUBSCRIBE, email to debian-user-portuguese-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 201009181729.52358.fcannini@gmail.com" target="_blank">http://lists.debian.org/[🔎] 201009181729.52358.fcannini@gmail.com



Reply to: