Обсуждение: How to Install postgresql-client-11 on Ubuntu 18.04?
on ubuntu 18.04, I'm trying to upgrade pg client, to v11 (although open to greater versions assuming backward compatibility) to get around this issue:
pg_dump: server version: 11.10; pg_dump version: 9.3.24
pg_dump: server version: 11.10; pg_dump version: 9.3.24
pg_dump: aborting because of server version mismatch
my steps so far have been to follow the quickstart from here: https://wiki.postgresql.org/wiki/Apt , which is..:
Import the repository key from https://www.postgresql.org/media/keys/ACCC4CF8.asc:
sudo apt install curl ca-certificates gnupg curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. In the example, replace buster with the actual distribution you are using. File contents:
deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main
(You may determine the codename of your distribution by running lsb_release -c). For a script version of the above file creation, presuming you are using a supported release:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
Finally, update the package lists, and start installing packages:
sudo apt update
and from here:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-11
However I get:sudo apt install postgresql-client-11
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-11
is client v11 supported on ubuntu 18.04? If yes, does anyone have steps?
--
-John
Re: John Zajac > Finally, update the package lists, and start installing packages: > > sudo apt update Did you actually run that step? > and from here: > > sudo apt install postgresql-client-11 > > > > However I get: > Reading package lists... Done > Building dependency tree > Reading state information... Done > E: Unable to locate package postgresql-11 > > > is client v11 supported on ubuntu 18.04? If yes, does anyone have steps? Christoph
I have been, yes, but looking more closely, getting some ignores and errors, here's a shortened output of it:
sudo apt update | grep postgres
WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
Ign http://apt.postgresql.org trusty-pgdg InRelease
Ign http://apt.postgresql.org trusty-pgdg Release.gpg
Ign http://apt.postgresql.org trusty-pgdg Release
Err http://apt.postgresql.org trusty-pgdg/main amd64 Packages
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en_US
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en
W: GPG error: http://repo.percona.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9334A25F8507EFA5
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/trusty-pgdg/main/binary-amd64/Packages 404 Not Found [IP: 217.196.149.55 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
sudo apt update | grep postgres
WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
Ign http://apt.postgresql.org trusty-pgdg InRelease
Ign http://apt.postgresql.org trusty-pgdg Release.gpg
Ign http://apt.postgresql.org trusty-pgdg Release
Err http://apt.postgresql.org trusty-pgdg/main amd64 Packages
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en_US
Ign http://apt.postgresql.org trusty-pgdg/main Translation-en
W: GPG error: http://repo.percona.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9334A25F8507EFA5
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/trusty-pgdg/main/binary-amd64/Packages 404 Not Found [IP: 217.196.149.55 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
On Mon, Aug 23, 2021 at 1:51 PM Christoph Berg <myon@debian.org> wrote:
Re: John Zajac
> Finally, update the package lists, and start installing packages:
>
> sudo apt update
Did you actually run that step?
> and from here:
>
> sudo apt install postgresql-client-11
>
>
>
> However I get:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package postgresql-11
>
>
> is client v11 supported on ubuntu 18.04? If yes, does anyone have steps?
Christoph
--
-John
Re: John Zajac > W: Failed to fetch > http://apt.postgresql.org/pub/repos/apt/dists/trusty-pgdg/main/binary-amd64/Packages > 404 Not Found [IP: 217.196.149.55 80] trusty has been end-of-life since early 2019 and has since been moved to apt-archive.postgresql.org. (Please consider upgrading.) Christoph