yum install for postgres 9.6 rpm on Amazon Linux 2 on EC2 is failing due to dependency

2

yum install for postgres 9.6 rpm on Amazon Linux 2 on EC2 is failing due to dependency /etc/redhat-release

Below is the log

sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
pgdg-centos96-9.6-3.noarch.rpm                                                                                                                 | 5.6 kB  00:00:00     

Examining /var/tmp/yum-root-BrRLfO/pgdg-centos96-9.6-3.noarch.rpm: pgdg-redhat-repo-42.0-4.noarch

Marking /var/tmp/yum-root-BrRLfO/pgdg-centos96-9.6-3.noarch.rpm to be installed

Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat-repo.noarch 0:42.0-4 will be installed
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch amzn2-core                                                                                                                                     | 2.4 kB  00:00:00     
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch
--> Finished Dependency Resolution

Error: Package: pgdg-redhat-repo-42.0-4.noarch (/pgdg-centos96-9.6-3.noarch)
           Requires: /etc/redhat-release

Roy

Posted 2019-05-06T06:01:26.427

Reputation: 21

while its broken - do it "manually": yum install y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-latest-x86_64/postgresql10-libs-10.7-2PGDG.rhel7.x86_64.rpm yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-latest-x86_64/postgresql10-10.7-2PGDG.rhel7.x86_64.rpm yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-latest-x86_64/postgresql10-server-10.7-2PGDG.rhel7.x86_64.rpm ah. sorry - this is for 10.7 - use 9.6 links instead – Vao Tsun – 2019-05-06T13:05:40.413

Thanks! I was able to get the files installed in the EC2 instance. However they dont seem attached to a repo. – Roy – 2019-05-07T07:36:32.967

Thanks, I was able to install them. But they now show as a installed without being attached to any repo. >> postgresql96.x86_64 installed. I tried running sudo yum resinstall postgresql96.x86_64 and it says Installed package postgresql96-9.6.12-1PGDG.rhel7.x86_64 not available. Error: Nothing to do – Roy – 2019-05-07T07:39:38.747

yes, alas its not a fix for repo, its just a "manual" way to put rpms to system overcoming "new limitation" – Vao Tsun – 2019-05-07T07:49:17.910

Thank you very much! I was finally able to get past this hurdle. I guess postgres on Amazon Linux 2 has some of its own nuances. Thanks again. It helped me move to the right direction. – Roy – 2019-05-08T19:35:14.140

Answers

4

Try sudo amazon-linux-extras

Amazon has a dedicated channel

https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras

Gramos

Posted 2019-05-06T06:01:26.427

Reputation: 41