Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpIYQ-0004cU-MI for pgsql-general@arkaria.postgresql.org; Fri, 04 Jun 2021 22:44:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lpIYP-0005tj-HH for pgsql-general@arkaria.postgresql.org; Fri, 04 Jun 2021 22:44:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpIYP-0005tb-8G for pgsql-general@lists.postgresql.org; Fri, 04 Jun 2021 22:44:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpIYM-0003Y8-UP for pgsql-general@postgresql.org; Fri, 04 Jun 2021 22:44:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 154MiWex449617; Fri, 4 Jun 2021 18:44:32 -0400 From: Tom Lane To: rob stan cc: pgsql-general@postgresql.org Subject: Re: symbol lookup error: /usr/lib/9.6/bin/psql: undefined symbol: PQsetErrorContextVisibility In-reply-to: References: Comments: In-reply-to rob stan message dated "Fri, 04 Jun 2021 18:21:02 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <449615.1622846672.1@sss.pgh.pa.us> Date: Fri, 04 Jun 2021 18:44:32 -0400 Message-ID: <449616.1622846672@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk rob stan 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