Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rob stan <aslicokay(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility
Date: 2021-06-04 22:44:32
Message-ID: 449616.1622846672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rob stan <aslicokay(at)gmail(dot)com> writes:
> I have a problem with connecting database via psql;/usr/lib/9.6/bin/psql:
> symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol:
> PQsetErrorContextVisibility

Apparently psql is linking to a pre-9.6 copy of libpq.so. You could
confirm that with
ldd /usr/lib/9.6/bin/psql

> I tried setting it didn't help; export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/postgresql/9.6/lib

(1) Are you sure there's a more up-to-date libpq.so there?
That path doesn't seem to square with where you say psql is.

(2) Possibly you need to put the 9.6 directory first not last.

(3) If that still doesn't work, you need to configure the system's
dynamic linker to look there. You really want to do that anyway,
as messing with LD_LIBRARY_PATH all the time is no fun.
See "man ldconfig".

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message rob stan 2021-06-05 02:17:12 Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility
Previous Message Ron 2021-06-04 22:39:40 Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility