Re: psql undefined symbol error on Ubuntu

From: Michael Wood <esiotrot(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql undefined symbol error on Ubuntu
Date: 2009-07-09 15:18:21
Message-ID: 5a8aa6680907090818j58e2c250nf36374996c0c6f9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I meant to send this to the list:

Hi

2009/7/9 raghu ram <raghuchennuru(at)gmail(dot)com>:
>
>
> On Thu, Jul 9, 2009 at 3:23 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>> "Harsha Hegde" <harsha(dot)hegde(at)vonage(dot)com> writes:
>> > I have installed postgres client on an Ubuntu machine. However, when I
>> > try to run 'psql', I get this error message:
>>
>> > # psql
>> > /usr/lib/postgresql/8.3/bin/psql: symbol lookup error:
>> > /usr/local/lib/libreadline.so.5: undefined symbol: PC
>>
>> This is a readline problem --- it's missing some underlying library,
>> probably libtermcap.
>>
>>                        regards, tom lane
>
> This is library missing error and you have to soft link with libedit.so.2.

This looks to me like the official Ubuntu postgresql-client-8.3
package.  It could, of course, be a third party package, but I think
that's unlikely based on where the psql command is installed.  Because
of this it was likely installed in the usual way with apt-get (or
similar), which would have made sure to install any required
dependencies, so it seems unlikely that the problem would be a missing
library or that libreadline.so.5 should be symlinked to libedit.so.2.

It's more likely that the version of libreadline.so.5 that ld.so finds
first on the library path is the wrong one.  This is especially
likely, since the one it appears to be finding is in /usr/local/lib
instead of where official Ubuntu packages install libraries (/lib or
/usr/lib).

> use below command to soft link with library.
>
> ln -s /lib/libreadline.so.5 /lib/libedit.so.2

That will have no effect here, because his "psql" is not using
/lib/readline.so.5.  It is trying to use
/usr/local/lib/libreadline.so.5 instead.

:)

--
Michael Wood <esiotrot(at)gmail(dot)com>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Wood 2009-07-09 15:20:57 Re: psql undefined symbol error on Ubuntu
Previous Message Harsha Hegde 2009-07-09 14:57:00 Re: psql undefined symbol error on Ubuntu