I do everything according to the documentation , but when you run the sudo apt-get install postgresql-9.2 libpq-dev command sudo apt-get install postgresql-9.2 libpq-dev errors like this:

 Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово E: Не удалось найти пакет postgresql-9.2 E: Не удалось найти пакет по регулярному выражению «postgresql-9.2» 

Also with this command sudo apt-get update :

 W: Недоступен открытый ключ для следующих ID ключей: 1397BC53640DB551 W: Не удалось получить http://apt.postgresql.org/pub/repos/apt/dists/YOUR_UBUNTU_VERSION_HERE-pgdg/main/binary-amd64/Packages 404 Not Found [IP: 217.196.149.55 80] W: Не удалось получить http://apt.postgresql.org/pub/repos/apt/dists/YOUR_UBUNTU_VERSION_HERE-pgdg/main/binary-i386/Packages 404 Not Found [IP: 217.196.149.55 80] W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/source/Sources 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found E: Некоторые индексные файлы не скачались. Они были проигнорированы или вместо них были использованы старые версии. 

Update

With the lsb_release -c command I recognized my version of Ubuntu, I registered it in the /etc/apt/sources.list.d/pgdg.list file as stated in the instructions, and now with sudo apt-get update they already sudo apt-get update these errors:

 W: Недоступен открытый ключ для следующих ID ключей: 1397BC53640DB551 W: Не удалось получить http://apt.postgresql.org/pub/repos/apt/dists/rafaela-pgdg/main/binary-amd64/Packages 404 Not Found [IP: 213.189.17.228 80] W: Не удалось получить http://apt.postgresql.org/pub/repos/apt/dists/rafaela-pgdg/main/binary-i386/Packages 404 Not Found [IP: 213.189.17.228 80] W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/source/Sources 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found E: Некоторые индексные файлы не скачались. Они были проигнорированы или вместо них были использованы старые версии. 

Everything was done already according to this instruction , the second item is the addition of a repository.

Update 2 Determined that Linux Mint 17.2 compiled based on Ubuntu 14.04. So the repositories wrote to the trusty. This line was released - deb apt.postgresql.org/pub/repos/apt trusty-pgdg main

 W: Недоступен открытый ключ для следующих ID ключей: 1397BC53640DB551 W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/source/Sources 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found W: Не удалось получить http://ppa.launchpad.net/pitti/postgresql/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found E: Некоторые индексные файлы не скачались. Они были проигнорированы или вместо них были использованы старые версии. 
  • Essentially install this particular version? If not difficult, specify the version of the operating system. Do you use Ubuntu? - cheops
  • @cheops It doesn't matter. Distributor ID: LinuxMint Description: Linux Mint 17.2 Rafaela Release: 17.2 Codename: rafaela - Maxim Cherevatov
  • lsb_release -c gave you the LM version, not Ubuntu. Well I wrote below, look for the package base, on the basis of which your version of the distribution kit is built. - D-side

1 answer 1

 YOUR_UBUNTU_VERSION_HERE 

Do not bother? When adding repositories, you forgot a significant step: replacing this piece with the first word of the code name of your version of Ubuntu. For 14.04, for example, it is trusty , from Trusty Tahr.

And in general, throw these out of nowhere taken instructions . They refer to the PPA, which has not been updated since 2012 (thanks to @KoVadim for the evidence). Even on the page of this PPA it is clearly stated:

[Deprecated] PostgreSQL backports for stable Ubuntu releases

ATTENTION: The functionality of this has been moved to http://apt.postgresql.org ,


First, PostgreSQL is in system repositories . The package is simply called postgresql , version 9.3 is delivered to Trusty.

Secondly, if you still need a version that is not in the system repositories, there is a page on the PostgreSQL wiki , which describes the procedure for adding the PostgreSQL Global Development Group repositories (PGDG), which are considered official .

  • I have Linux Mint. I do not quite understand when it was necessary to register the first word of the code name of the OS - Maxim Cherevatov
  • @MaximCherevatov look for what your version of "package base", LM is built on the basis of Ubuntu. It was necessary to register them in the addresses of the repositories that you copied from the installation instructions. - D-side
  • added update - Maxim Cherevatov
  • @MaximCherevatov you did NOT do what I wrote in the comment above%) - D-side
  • one
    at ppa.launchpad.net/pitti/postgresql/ubuntu/dists there are no packages for trusty. - KoVadim