Search code examples
postgresqllinux-mint-19postgresql-13

postgresql-client-13 : Depends: libpq5 (>= 13~beta2) but 12.3-1.pgdg18.04+1 is to be installed


I want to try new PostgreSQL and follow this instruction. But installation fails:

$ sudo apt install postgresql-client-13
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-client-13 : Depends: libpq5 (>= 13~beta2) but 12.3-1.pgdg18.04+1 is to be installed
E: Unable to correct problems, you have held broken packages.

I also tried this instruction to resolve unmet dependencies

What did I wrong and how to install psql 13?

UPD
Content of my sources.list.d:

kes@kes-X751SA /etc/apt/sources.list.d $ cat pgdg.list 
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

kes@kes-X751SA /etc/apt/sources.list.d $ cat pgdg-testing.list 
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg-testing main 13

Also:

$ sudo apt-cache policy postgresql-13
postgresql-13:
  Installed: (none)
  Candidate: 13~beta2-1.pgdg18.04+1
  Version table:
     13~beta2-1.pgdg18.04+1 100
        100 http://apt.postgresql.org/pub/repos/apt bionic-pgdg-testing/13 amd64 Packages

Solution

  • Had the same problem.
    in /etc/apt/sources.list.d/pgdg.list where you have

    deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
    

    change it to

    deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main 13
    

    then run

    sudo apt update
    

    and then you can do

    sudo apt install postgresql-13 postgresql-client-13
    

    that worked on my machine.

    Just FYI:

    WARNING: The data format may change between beta releases. Be prepared to pg_dump the database contents before you upgrade the package to a newer beta or to a final release. Check the release notes before upgrading.