[GRASSLIST:5452] problem in g.select.pg

Hi

when I try to connect postgreSQL server this message appears:
/"g.select.pg: error while loading shared libraries: libpq.so: cannot open shared object file: No such file or directory."

/How can I correct it ?

thanks in advance

Ahmet Temiz
Turkey/
/

______________________________________
Scanned and protected by Inflex
http://pldaniels.com/inflex

______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.

temiz schrieb:

when I try to connect postgreSQL server this message appears:
/"g.select.pg: error while loading shared libraries: libpq.so: cannot open shared object file: No such file or directory."

/How can I correct it ?

Sounds like there is a problem with your installation. Did you install from a binary or from source? What OS are you using?

On suse-linux the missing file "libpq.so" is provided by the postgresql-libs rpm. So you would correct it by installing postgresql-libs.

Ingo

temiz schrieb:
> when I try to connect postgreSQL server this message appears:
> /"g.select.pg: error while loading shared libraries: libpq.so: cannot
> open shared object file: No such file or directory."
>
> /How can I correct it ?

Sounds like there is a problem with your installation. Did you install
from a binary or from source? What OS are you using?

On suse-linux the missing file "libpq.so" is provided by the
postgresql-libs rpm. So you would correct it by installing postgresql-libs.

Ingo

temiz schrieb:

>>> when I try to connect postgreSQL server this message appears:
>>> /"g.select.pg: error while loading shared libraries: libpq.so: cannot
>>> open shared object file: No such file or directory."
>>>
>>> /How can I correct it ?
...
> I am using RH 8.0.
> I installed grass from binary file and postgre from Red Hat CD

Please post the output of the following command:

for i in `rpm -qa | grep -i postgres`; do echo -e "\n" $i ":"; rpm -ql
$i | grep -i libpq\.so; done

Here it is: (./psql_why a ex. file containing your comands)

postgresql-server-7.2.2-1 :
rpmq: no arguments given for query
./psql_why: line 3: postgresql-server-7.2.2-1: command not found

..

O.K., maybe i should be a bit more verbose.
I think you're missing a package in your installation, namely the package containing the file "libpq.so". To ensure my assumption i want you to check your postgres packages, whether there is a file called "libpq.so" on your system.
How to find out?
The dirty one-liner i sent you would do, but you have to write it in one line. Or like this:

#-------snip-------------------

#Get a list of installed packages
#with the word "postgres" in their name:
for i in `rpm -qa | grep -i postgres`;
#now take every package found and ...
do
   #... print the package's name:
   echo -e "\n" $i ":";
   #... and print all filenames containing the string "libpq.so"
   rpm -ql $i | grep -i libpq\.so;
done

#-------snip---------------------

On my SuSE-Linux system the result looks like this:

#-------snap---------------------

wichmann@i3:~> for i in `rpm -qa | grep -i postgres`;
> do
> echo -e "\n" $i ":";
> rpm -ql $i | grep -i libpq\.so;
> done

  postgresql-libs-7.2-90 :
/usr/lib/libpq.so.2
/usr/lib/libpq.so.2.0
/usr/lib/libpq.so.2.2

  postgresql-perl-7.2-90 :

  postgresql-tcl-7.2-90 :

  postgresql-server-7.2-90 :

  postgresql-7.2-90 :

  postgresql-tk-7.2-90 :

  postgresql-devel-7.2-90 :
/usr/lib/libpq.so

#-------snap-----------------------

As you can see, there are two packages named "postgresql-libs" and "postgresql-devel" containing (different versions) of the file you are missing. I don't know how they are called on your redhat system, but i guess their names are similar. You have to find these on your redhat cd's and install them.
Alternatively you can try and remove your grass installation and install the grass rpm packages provided by the intevation guys:

http://ftp.gwdg.de/pub/misc/freegis/intevation/freegis/gnu-linux-i586/updates/

Ingo