1

I am having a hard time getting postgres re-installed on Cent OS 7.2.Here is what I tried.

  • Went to YUM repo of postgres
  • Created a temporary folder on my machine for the RPM file
  • Did wget https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-redhat95-9.5-2.noarch.rpm
  • Next I ran rpm -ivh filename

But all I am getting is package pgdg-centos95-9.5-2.noarch is already installed.

I am fine with the error message, but when I install postgres components using the below command.

sudo yum install postgresql95-server.x86_64 postgresql95-contrib.x86_64 postgresql95-devel.x86_64

It lists, the details from a different rpm from what I have downloaded, i.e 9.5.1-1PGDG.rhel7

Dependencies Resolved

==============================================================================================================================================================================================
 Package                                              Arch                                   Version                                             Repository                              Size
==============================================================================================================================================================================================
Installing:
 postgresql95-contrib                                 x86_64                                 9.5.1-1PGDG.rhel7                                   pgdg95                                 526 k
 postgresql95-devel                                   x86_64                                 9.5.1-1PGDG.rhel7                                   pgdg95                                 1.7 M
 postgresql95-server                                  x86_64                                 9.5.1-1PGDG.rhel7                                   pgdg95                                 4.1 M
Installing for dependencies:
 postgresql95                                         x86_64                                 9.5.1-1PGDG.rhel7                                   pgdg95                                 1.3 M
 postgresql95-libs                                    x86_64                                 9.5.1-1PGDG.rhel7                                   pgdg95                                 218 k

Transaction Summary
==============================================================================================================================================================================================

When I go ahead with the installation,I am hitting 404 error messages for all the packages.

No Presto metadata available for pgdg95
postgresql95-9.5.1-1PGDG.rhel7 FAILED                                          
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/postgresql95-9.5.1-1PGDG.rhel7.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found    ]  0.0 B/s |    0 B  --:--:-- ETA 
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

postgresql95-devel-9.5.1-1PGDG FAILED                                          
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/postgresql95-devel-9.5.1-1PGDG.rhel7.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found 0.0 B/s |    0 B  --:--:-- ETA 
Trying other mirror.
postgresql95-contrib-9.5.1-1PG FAILED                                          
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/postgresql95-contrib-9.5.1-1PGDG.rhel7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: download.postgresql.org; Temporary failure in name resolution"
Trying other mirror.
postgresql95-libs-9.5.1-1PGDG. FAILED                                          
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/postgresql95-libs-9.5.1-1PGDG.rhel7.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found  0.0 B/s |    0 B  --:--:-- ETA 
Trying other mirror.
postgresql95-server-9.5.1-1PGD FAILED                                          
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/postgresql95-server-9.5.1-1PGDG.rhel7.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found0.0 B/s |    0 B  --:--:-- ETA 
Trying other mirror.

What am I doing wrong here and why postgres is not getting installed from the rpm that I have downloaded.I am assuming that the rpm version mismatch is the issue.

  • what about doing installing postgresql without the 95? – sysfiend May 16 '16 at 12:38
  • @Alex : That installs an older version i.e 9.2 – Greedy Coder May 16 '16 at 12:43
  • Downvoters..care to comment ? – Greedy Coder May 16 '16 at 12:59
1

Apparently the fix I did was pretty brute force and might be dumb, but it works anyway.

I did sudo find / -iname "pgdg95".

Ran rm -rf on all the folders and files listed.

Repeated the steps listed above and it installed fine.

This answer helped me to get it up and running.Also had to change hba.conf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.