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

6,536

Solution 1

Try sudo amazon-linux-extras

Amazon has a dedicated channel

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

Solution 2

from https://techviewleo.com/install-postgresql-12-on-amazon-linux/

sudo yum -y update

sudo tee /etc/yum.repos.d/pgdg.repo<<EOF
[pgdg12]
name=PostgreSQL 12 for RHEL/CentOS 7 - x86_64
baseurl=https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7-x86_64
enabled=1
gpgcheck=0
EOF

sudo yum makecache

sudo yum install postgresql12 postgresql12-server
Share:
6,536

Related videos on Youtube

Roy
Author by

Roy

Updated on September 18, 2022

Comments

  • Roy
    Roy over 1 year

    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
    
  • jpganz18
    jpganz18 almost 3 years
    but what do you actually do with this? can you place the whole command?