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

From: rob stan <aslicokay(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility
Date: 2021-06-05 02:17:12
Message-ID: CAGADRUEedQ37y7YwN3+hbP6cCT=vURMNqCWAwSLXc2x1oTEhUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Tom ;

Thank you for your detailed email.

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

You're absolutely right i have bad linking for it to old version 9.5 in the
same node.
Here they are ;

linux-vdso.so.1 (0x00007ffc4594e000)
libpq.so.5 => /usr/lib/postgresql/9.5/lib/libpq.so.5
(0x00007fe79f2c2000)
libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2
(0x00007fe79f08a000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe79ed86000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe79e9e7000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1
(0x00007fe79e77b000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
(0x00007fe79e2e0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fe79e0c3000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5
(0x00007fe79dea0000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007fe79dc76000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0
(0x00007fe79da61000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe79f77f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe79d85d000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe79d655000)

> 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.
You mean linking like 9.5 as below right ?

libpq.so.5 => /usr/lib/postgresql/9.5/lib/libpq.so.5 (will add version 9.6
link ,too if i got it right)

(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".

I tried but i think i missed something.

Appreciate it.

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 4 Haz 2021 Cum, 18:44 tarihinde şunu yazdı:

> 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

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2021-06-05 09:49:10 Ideas for building a system that parses medical research publications/articles
Previous Message Tom Lane 2021-06-04 22:44:32 Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility