lbened
lbened

Reputation: 85

How to upgrade postregsql-client on ubuntu?

I am trying to use pg_dump that comes from postgresql.

Problem is I have the error pg_dump: error: server version: 13.9; pg_dump version: 12.12 (Ubuntu 12.12-0ubuntu0.20.04.1)

I tried to upgrade it with sudo apt-get install -y postgresql-client-13 but I have errors like E: Unable to locate package postgresql-client-13

I tried sudo apt update && sudo apt upgrade -y but nothing changed.

What can I do to upgrade the version in order to have 13.9 version (same version than server version) ?

Upvotes: 0

Views: 707

Answers (1)

sami lekesiz
sami lekesiz

Reputation: 91

Create the file repository configuration:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Update the package lists:

apt update and apt install postgresql-client-13

Upvotes: 1

Related Questions