0

I got an error when I tried to update sudo apt-get update as below:

Err:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
  Temporary failure resolving 'apt.postgresql.org'
Err:2 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu xenial InRelease
  Temporary failure resolving 'ppa.launchpad.net'
Err:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'security.ubuntu.com'
Err:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Err:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Err:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'us.archive.ubuntu.com'
Err:7 https://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
  Could not resolve host: apt.postgresql.org
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en_US.UTF-8) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Temporary failure resolving 'us.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/xenial-pgdg/InRelease  Temporary failure resolving 'apt.postgresql.org'
W: Failed to fetch https://apt.postgresql.org/pub/repos/apt/dists/trusty-pgdg/InRelease  Could not resolve host: apt.postgresql.org
W: Failed to fetch http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target Translations (main/i18n/Translation-en_US.UTF-8) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/pgdg.list:1

After that, I go on to install my postgresql sudo apt-get install postgresql, it gave me an error as this

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql

What is wrong, How can I update and install postgresql? Thanks

Melebius
  • 11,431
  • 9
  • 52
  • 78
  • 1
    I'd also suggest going to System settings > Software and Updates > Other Software to remove duplicate entries, so you fix some of those update warnings as well. – hiigaran Aug 15 '18 at 13:11
  • Wha tis your ubuntu version? Is it old? If is it old you can update your ubuntu to 18.04 – AmirM Aug 15 '18 at 11:54

0 Answers0