Re: psql undefined symbol error on Ubuntu

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Wood <esiotrot(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql undefined symbol error on Ubuntu
Date: 2009-07-09 16:14:31
Message-ID: 1288.1247156071@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Michael Wood <esiotrot(at)gmail(dot)com> writes:
> Google returns many results for the error
> "/usr/local/lib/libreadline.so.5: undefined symbol: PC". It is not
> clear to me why so many people encounter this error, though.

Historically the problem with readline has been that it can function
with either of two underlying libraries (termcap or ncurses, if memory
serves) and somebody thought it would be a brilliant idea to postpone
the decision to runtime. Which meant that instead of having a package
manager dependency on one or the other, libreadline packages were
shipped with no explicit dependency on *either*. Everything was fine
if you actually had one of the two installed; if not, not so much.

Of course this approach is pretty idiotic in the context of modern
package-manager-based distributions. Red Hat started forcing a choice
some years ago. I'm not sure what Ubuntu does. I suspect what the OP
has got is one of these ill-considered packages with no hard dependency;
but as you say, if it were an official Ubuntu package it wouldn't be
installing into /usr/local.

I don't have anything to add to your advice about how to fix it, just
wanted to shed a bit of light on why readline has got a history of this
kind of issue.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Gould 2009-07-09 16:37:27 Re: Setting up security for development
Previous Message Michael Gould 2009-07-09 15:23:02 Setting up security for development