Forum OpenACS Q&A: error PostgreSQL installation

Collapse
Posted by xXx Prince on
currently i'm installing postgres 7.4.5
i have done all the instruction on the document provided
but i have a problem on psql command
i have successfully created the database
but i cannot entering the psql command

this was what had appeared:
*****************************************************************

[postgres@localhost postgresql-7.4.5]$ createdb test
CREATE DATABASE
[postgres@localhost postgresql-7.4.5]$ psql test
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

psql: relocation error: psql: undefined symbol: PQgetssl
[postgres@localhost postgresql-7.4.5]$
*****************************************************************

hope u all can help me solving this problem
i'm doing my thesis right now
A.S.A.P
thank you!

Collapse
Posted by Patrick Giagnocavo on
First, find the full path to the psql binary, by running "which psql" . Then run "ldd /path/to/psql" . For example, if the psql binary is /usr/local/bin/psql , run "ldd /usr/local/bin/psql" .

Then look at the list of libraries it is linking against. I believe you will find that it is linked against an SSL library that is not on the machine.

Collapse
Posted by xXx Prince on
hi patrick..

i have entered the cdm "which psql"
then it appears "usr/bin/psql"
i entered the cmd "ldd/usr/bin/psql"
it appears like this..

***************************************************************
[postgres@localhost postgresql-7.4.10]$ which psql
/usr/bin/psql
[postgres@localhost postgresql-7.4.10]$ ldd /usr/local/bin/psql
ldd: /usr/local/bin/psql: No such file or directory
[postgres@localhost postgresql-7.4.10]$ ldd /usr/bin/psql
libpq.so.3 => /usr/local/pgsql/lib/libpq.so.3 (0x40017000)
libpam.so.0 => /lib/libpam.so.0 (0x40040000)
libssl.so.4 => /lib/libssl.so.4 (0x40048000)
libcrypto.so.4 => /lib/libcrypto.so.4 (0x4007d000)
libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x4016e000)
libz.so.1 => /usr/lib/libz.so.1 (0x401cc000)
libreadline.so.4 => /usr/lib/libreadline.so.4 (0x401db000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x40207000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4020b000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40238000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4024a000)
libdl.so.2 => /lib/libdl.so.2 (0x4025f000)
libm.so.6 => /lib/tls/libm.so.6 (0x40263000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
libgssapi_krb5.so.2 => /usr/kerberos/lib/libgssapi_krb5.so.2 (0x40285000)
libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3 (0x40298000)
libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3 (0x402a8000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[postgres@localhost postgresql-7.4.10]$

***************************************************************

how can we know that our psql is not connected to SSL as what u have mentioned?
then how can i install those machines?
A.S.A.P
thank you!

Collapse
Posted by Torben Brosten on
Which os/distribution are you using?

Which instructions are you following?

Collapse
Posted by Joe Cooper on
As Torben has pointed out, you have a binary that is looking for libs that aren't available. In short, you have a broken installation of PostgreSQL. Probably from a binary package intended for another OS distribution or OS version. Uninstall it and install the correct one for your OS (making sure dependencies are met, rather than ignored).
Collapse
Posted by xXx Prince on
hi..

actually..i'm using my windows xp as my main o/s
i juz using red hat 9 as my virtual o/s using VMWare
have u heard it?

i reead wut u have posted..
maybe i have made mistake during the red hat installation
is it true?
coz i'm newbie in redhat + postgresql + aolserver + openacs
hope u can help me..

and 1 more thing..
i've error in stopping my postgresql..
i stop it at root but it failed
do you know why?

p/s: i've followed all the documentation step..
still have a problem..

Collapse
Posted by Torben Brosten on
Which instructions are you following? One of these or another?

https://openacs.org/doc/current/win2k-installation.html
https://openacs.org/doc/current/install-redhat.html
https://openacs.org/doc/current/postgres.html

And where there are choices, which on(s) did you use?

I suspect you have more than one pg installed, maybe 3, based on the different versions that are shown in your examples: 7.4.5, 7.3.2, 7.4.10. Notice, when you start psql:

[postgres@localhost postgresql-7.4.5]$ psql test
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Collapse
Posted by xXx Prince on
hi torben..

i've followed all the instruction on the documentation u have link..
i've followed exactly wut are the steps in the documnetation..
still error in stopping the postgresql!

actually..
how can we prevent our installation from having many pg..as u have mentioned early?
is this problem occurs during our redhat installation?
or else?

thank you!

Collapse
Posted by Torben Brosten on
I am still unclear on which one of those instructions you are following.

Regardless, I currently do not use RedHat so can only speculate. If remember correctly, Redhat has installation choices. Some automatically install postgres. Perhaps the VMWare image has an install in it already also?

If you try installing again from the beginning, before installing postgres, check for any existing versions. If you find any, you need to decide on whether you want to keep the currently installed version, or uninstall it so you can cleanly install a new one.

Collapse
Posted by Nitish Bezzala on
Postgresql does not stop if there are any connections to the database, either from AOLServer, or from your terminal.
Try using
$ pg_ctl –m fast