On Debian, libpq.so.5
(which is the shared library for postgresql client programs) is in the libpq5
package, so to install it, run:
sudo apt-get install libpq5
From the package description:
$ apt-cache show libpq5
Package: libpq5
Source: postgresql-13
Version: 13.4-3
Installed-Size: 779
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Architecture: amd64
Depends: libc6 (>= 2.25), libgssapi-krb5-2 (>= 1.17), libldap-2.4-2 (>= 2.4.7),
libssl1.1 (>= 1.1.0)
Description-en: PostgreSQL C client library
libpq is a C library that enables user programs to communicate with
the PostgreSQL database server. The server can be on another machine
and accessed through TCP/IP. This version of libpq is compatible
with servers from PostgreSQL 8.2 or later.
.
This package contains the run-time library, needed by packages using
libpq.
.
PostgreSQL is an object-relational SQL database management system.
BTW, you can use the apt-file
command (which is in the apt-file
package) to find which package a filename (or partial filename) belongs to. e.g.
$ apt-file search libpq.so.5
libpq5: /usr/lib/x86_64-linux-gnu/libpq.so.5
libpq5: /usr/lib/x86_64-linux-gnu/libpq.so.5.12