Error: You must install at least one postgresql-client-<version> package
The error message "You must install at least one postgresql-client-<version> package" indicates that while you have the postgresql-client-common package installed, you are missing the specific versioned client package required to utilize PostgreSQL client programs like psql, pg_dump, pg_restore, etc. This typically occurs on Debian-based systems like Ubuntu.
To resolve this issue, you need to install the appropriate PostgreSQL client package for your system. The simplest solution is to install the
postgresql-client metapackage, which will automatically install the currently supported version of the PostgreSQL client for your distribution. Here are the steps to fix this error: Update your package list.
Code
sudo apt update
install the postgresql-client metapackage.
Code
sudo apt install postgresql-client
This command will install the necessary version-specific
postgresql-client-<version> package along with any other dependencies required for the PostgreSQL client tools to function correctly. If you specifically require a particular PostgreSQL client version (e.g.,
postgresql-client-15), you can install it directly: Code
sudo apt install postgresql-client-15
Replace
15 with the desired PostgreSQL version