Forum OpenACS Q&A: Re: psql: relocation error: psql: undefined symbol: PQgetssl

Collapse
Posted by Jim Lynch on
psql: relocation error: psql: undefined symbol: PQgetssl

This is a "linker" error; the linker's job is to connect some executable to the libraries it uses. So, this error is related to binary files, i.e., something that has been compiled and linked. It is not related to scripts or configurations (except  possibly pre-compile source-configuration scripts).

My guess is that you have been trying repeatedly to get things to work, and not everything got rebuilt as you tried again under newer conditions.

The usual thing to do in a case like this is to delete all the binary files and rebuild the whole thing[1], but there is another possibility lurking:

You might also have several versions of postgres lying around, maybe one that was installed with your OS and the one you're trying to compile, at minimum. It could be that the psql you are trying to run is not the one for the version of postgres you are building (i.e., it's the wrong one). You should find out if this is the case[2], locate the correct binaries and arrange to search first for binaries there.

[1]
  make clean
  make

[2]
  which psql
  (-or-)
  whereis psql

Jim,

I appreciate the time invested in your reply and explanation.  Although I still don't grasp the concept as well as I'd like, you did help me identify the issue and get it resolved.  I've determined that I indeed have/had two versions of PostgreSQL installed on the system.  I had originally installed it during the RH9 install, but later "thought" I removed it and then reinstalled using the provided step-by-step instructions.

After I figured this out, it was considerably easier in getting the system functional.  In fact, I have a fully installed system waiting for me to begin testing on now, woohoo 😉

The only issue I'm having still is getting the auto-restart for AOLServer working correctly, specifically in attempting to get the inittab portion working (the restart-aolserver script works fine).  I'm still trying some things though, but might ask for assistance if our UNIX admin is too busy this week.  Thanks again for your help!

Collapse
Posted by Rajesh k on
hi ,

platform : redhat linux 9
-----------------------------------
I have tried using both the postgresql-7.3.2.tar.gz and  postgresql-7.3.6.tar.gz
I get the same error:

bash-2.05b$]$ createdb test
              CREATE DATABASE

bash-2.05b$]$ psql test
Welcome to psql, 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

Can you please advise me what to do?

thanx,