Unmet dependencies for PostgreSQL 10 under Ubuntu 16.04.5 LTS (xenial)

6,913

Solution 1

On the PostgreSQL: Linux downloads (Ubuntu) page, you chose "Bionic (18.04)"1, which does not match your actual Ubuntu version, "Xenial (16.04)".

Assuming this is the only error you made while following the instructions on that page, you can fix this by opening the file /etc/apt/sources.list.d/pgdg.list as root and changing every mention of bionic to xenial.

Here is a command you can run to do this immediately:

sudo sed -i 's/bionic/xenial/g' /etc/apt/sources.list.d/pgdg.list

After you have done that, you should be able to install PostgreSQL 10 like so:

sudo apt update
sudo apt install postgresql-10

1 I was able to determine that you selected the bionic repo by checking the contents of http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/main/binary-amd64/Packages and seeing that the dependencies of Package: postgresql-10 match your list of unresolvable dependencies.

Solution 2

I am having same problem as the OP above, I tried installing postgres 10 and 11 on Ubuntu 16.04 Xenial. Official documentation shows to include the deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main inside the /etc/apt/sources.list.d/pgdg.list

which I have:

ohanzely@W-0319:~$ cat /etc/apt/sources.list.d/pgdg.list deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main the problem is not the repository, rather that Ubuntu 16.04 does not have the required version of supporting library, it shows right there in message:

Depends: libgssapi-krb5-2 (>= 1.14+dfsg) but 1.13.2+dfsg-5ubuntu2.1 is to be installed

I can only have installed 1.13.2 version, but packages require newer. Bionic has 1.16.x versions. So Postgres 10 and above cannot be actually installed on Ubuntu 16.04 due to other dependencies never built for the system. I could not resolve the issue.

Share:
6,913

Related videos on Youtube

AntonAL
Author by

AntonAL

Качественная разработка сайтов для компаний, товаров и услуг. Development of quality websites for companies, products and services.

Updated on September 18, 2022

Comments

  • AntonAL
    AntonAL almost 2 years

    Following official instructions in https://www.postgresql.org/download/linux/ubuntu/, I got following error:

    The following packages have unmet dependencies:
     postgresql-10 : Depends: postgresql-client-10
                     Depends: libgssapi-krb5-2 (>= 1.14+dfsg) but 1.13.2+dfsg-5ubuntu2 is to be installed
                     Depends: libicu60 (>= 60.1-1~) but it is not installable
                     Depends: libpq5 (>= 9.3~) but it is not going to be installed
                     Depends: libssl1.1 (>= 1.1.0) but it is not installable
                     Recommends: sysstat but it is not going to be installed
    

    Linux distribution is: Ubuntu 16.04.5 LTS

    I've tried many recommendations, that are about purging, upgrading apt, but nothing helps.

    Is it ever possible to install PostgreSQL 10 under Ubuntu 16.04.5 LTS?

    Also, I'm unable now to install PostgreSQL 9.6 version, that AFAIK, comes standard…

    How to revert to standard version?

  • Deltik
    Deltik over 5 years
    Aside: A CentOS user made the same mistake before.