Score:3

apt-get install postgresql-client says I'm upto date but I'm not

bg flag

I'm running Ubuntu 18.04 on an AWS box. I have postgresql 10.22. We just update the rds and, apparently, 10.22 is not compatible with pg server version 14. So I want to upgrade. I ran $ sudo apt-get update $ sudo apt-get install postgresql-client-14 response: E: Unable to locate package postgresql-client-14

I ran $ sudo apt-get install postgresql-client Response: postgresql-client is already the latest version (10+190ubuntu0.1). But https://www.postgresql.org/ftp/source/ shows the latest version as 15.1 so that's wrong.

I ran $ sudo apt-get upgrade postgresql-client Reponse: https://www.postgresql.org/ftp/source/

I'm stuck! How do I update the postgreql-client?

PS I looked at Unable to install files with apt-get: "unable to locate package" and their advice was to do "sudo apt-get update" before the install which is why I did that. What's the NEXT thing after that? ;-)

Score:3
in flag

To have the PostgreSQL 14 client on your Ubuntu 18.04 server, you'll need to add the official PostgreSQL repository and perform the installation. Here's how you can do that:

  1. Connect to your server

  2. Create a new apt sources file and add the PostgreSQL repository:

    sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/postgres.list'
    
  3. Import the GPG signing key for this repository:

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

    sudo apt update
    

    If no errors are reported, we can continue.

  5. Install the PostgreSQL 14 client:

    sudo apt install postgresql-client-14
    

If you will not need the PostgreSQL 10 client that is currently installed, it may make sense to remove it so that you know every connection is made with the 14 client.

Score:0
ng flag

It looks like postgresql-client-14 is not in the default 18.04 apt repository. It is in the 22.04 repos so you can upgrade your Ubuntu or follow the instructions here to add the PostgresSQL Apt repositories and install the version you need.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.