[GRASSLIST:5463] Re: problem in g.select.pg

Ingo Wichmann wichmann at uni-wuppertal.de
Tue Feb 4 06:04:25 EST 2003


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 at 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




More information about the grass-user mailing list