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

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
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
5

2 Answers

Try sudo amazon-linux-extras

Amazon has a dedicated channel

1

from

sudo yum -y update
sudo tee /etc/yum.repos.d/pgdg.repo<<EOF
[pgdg12]
name=PostgreSQL 12 for RHEL/CentOS 7 - x86_64
baseurl=
enabled=1
gpgcheck=0
EOF
sudo yum makecache
sudo yum install postgresql12 postgresql12-server

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like