On a Debian based system the PostreSQL client programs are provided by postgresql-client-common as symbolic links to /usr/share/postgresql-common/pg_wrapper
.
If you install that package and attempt to use any of the PostgreSQL client programs like psql, pg_dump, pg_dumpall, and pg_restore, the pg_wrapper without having the version specific binary package installed, like postgresql-client-9.1 it will emit this error:
You must install at least one postgresql-client-< version > package
The easiest way to fix this is to install the postgresql-client metapackage. It always depends on the currently supported database client package for PostgreSQL on Debian based systems and it depends on postgresql-client-common
sudo apt-get install postgresql-client
Update March 30th, 2020
Agree with the chosen answer, but I found to install postgresql-client-12 on a Ubuntu 18 slightly more involved.
sudo apt update
sudo apt -y install vim bash-completion wget
sudo apt -y upgrade
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt -y install postgresql-client-12
See this reference for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With