Trouble installing postgresql server on Amazon Linux

Started by Augoriabout 10 years ago6 messagesgeneral
Jump to latest
#1Augori
augori@gmail.com

Hello,

I'm trying to install postgresql on an Amazon Linux AMI release 2015.09. I
got the rpm for Amazon Linux AMI 2015.03 - x86_64 under PostgreSQL 9.3
linked here:
http://yum.postgresql.org/repopackages.php

But a yum install complains that it requires systemd-units, which I
haven't figure out how to get. The yum command and result:

]# yum -y install postgresql93 postgresql93-server postgresql93-contrib
postgresql93-libs
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration
Repository pgdg93-source is listed more than once in the configuration
8 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgresql93.x86_64 0:9.3.10-1PGDG.rhel7 will be installed
---> Package postgresql93-contrib.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
---> Package postgresql93-libs.x86_64 0:9.3.10-1PGDG.rhel7 will be installed
---> Package postgresql93-server.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql93-server-9.3.10-1PGDG.rhel7.x86_64 (pgdg93)
Requires: systemd-units
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

----------------------------------------------------------------------------------------

The --skip-broken option returns Errno 256
# yum -y install --skip-broken postgresql93 postgresql93-server
postgresql93-contrib postgresql93-libs
.
.
.
Error downloading packages:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256]
No more mirrors to try.
postgresql93-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256] No more
mirrors to try.
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256] No
more mirrors to try.

----------------------------------------------------------------------------------------

I've tried quite a few other things, but now I'm back to the same error.
Do you have any suggestions?

Thank you,
Augori

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Augori (#1)
Re: Trouble installing postgresql server on Amazon Linux

On 02/07/2016 11:18 AM, Augori wrote:

Hello,

I'm trying to install postgresql on an Amazon Linux AMI release
2015.09. I got the rpm for Amazon Linux AMI 2015.03 - x86_64 under
PostgreSQL 9.3 linked here:
http://yum.postgresql.org/repopackages.php

But a yum install complains that it requires systemd-units, which I
haven't figure out how to get. The yum command and result:

]# yum -y install postgresql93 postgresql93-server postgresql93-contrib
postgresql93-libs
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration

The above seems to be part of the problem. Looks like you have two
repositories for pgdg93.

Are you sure the AMI did not already have a repo for Postgres?

Repository pgdg93-source is listed more than once in the configuration
8 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgresql93.x86_64 0:9.3.10-1PGDG.rhel7 will be installed

The above would seem to be the second problem and related to the first.
When I peeked into:

http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-ami201503-93-9.3-2.noarch.rpm

it showed that it was looking for:

https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-$basearch

Seems you are trying to install a RH 7 package on an OS that is looking
for a RH 6 package. In other words yum is finding the RH 7 repo before
the RH 6 repo.

---> Package postgresql93-contrib.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
---> Package postgresql93-libs.x86_64 0:9.3.10-1PGDG.rhel7 will be installed
---> Package postgresql93-server.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql93-server-9.3.10-1PGDG.rhel7.x86_64 (pgdg93)
Requires: systemd-units
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

----------------------------------------------------------------------------------------

The --skip-broken option returns Errno 256
# yum -y install --skip-broken postgresql93 postgresql93-server
postgresql93-contrib postgresql93-libs
.
.
.
Error downloading packages:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno
256] No more mirrors to try.
postgresql93-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256] No
more mirrors to try.
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256]
No more mirrors to try.

----------------------------------------------------------------------------------------

I've tried quite a few other things, but now I'm back to the same
error. Do you have any suggestions?

Thank you,
Augori

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Augori
augori@gmail.com
In reply to: Adrian Klaver (#2)
Re: Trouble installing postgresql server on Amazon Linux

Thanks for the reply. Yes, it seems that you're right about having
multiple pgdg93 repos,.

# yum repolist
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration
Repository pgdg93-source is listed more than once in the configuration
8 packages excluded due to repository priority protections
repo id repo name
status
!amzn-main/latest amzn-main-Base
5,443+50
!amzn-updates/latest amzn-updates-Base
692+48
percona-release-noarch/latest Percona-Release YUM repository -
n 37
percona-release-x86_64/latest/x86_64 Percona-Release YUM repository - x
724+4
pgdg93/x86_64 PostgreSQL 9.3 - Amazon Linux AMI
284+4
repolist: 7,180

Can you suggest how I can go about removing the duplicate?
# ls -l /etc/yum.repos.d /etc/yum.repos.d
/etc/yum.repos.d:
total 36
-rw-r--r-- 1 root root 696 Feb 2 17:52 amzn-main.repo
-rw-r--r-- 1 root root 328 Sep 16 00:48 amzn-nosrc.repo
-rw-r--r-- 1 root root 694 Sep 16 00:48 amzn-preview.repo
-rw-r--r-- 1 root root 714 Feb 2 17:52 amzn-updates.repo
-rw-r--r-- 1 root root 957 Mar 1 2013 epel.repo
-rw-r--r-- 1 root root 1056 Mar 1 2013 epel-testing.repo
-rw-r--r-- 1 root root 2501 Sep 22 2014 percona-release.repo
-rw-r--r-- 1 root root 490 Oct 21 09:07 pgdg-93-ami201503.repo
-rw-r--r-- 1 root root 442 May 8 2013 pgdg-93-redhat.repo

... In fact, it seems like both of them must be the wrong repos? So I need
to remove these?
# rpm -e pgdg-93-redhat.repo
error: package pgdg-93-redhat.repo is not installed
# rpm -e pgdg-93-ami201503.repo
error: package pgdg-93-ami201503.repo is not installed

On Sun, Feb 7, 2016 at 2:52 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 02/07/2016 11:18 AM, Augori wrote:

Hello,

I'm trying to install postgresql on an Amazon Linux AMI release
2015.09. I got the rpm for Amazon Linux AMI 2015.03 - x86_64 under
PostgreSQL 9.3 linked here:
http://yum.postgresql.org/repopackages.php

But a yum install complains that it requires systemd-units, which I
haven't figure out how to get. The yum command and result:

]# yum -y install postgresql93 postgresql93-server postgresql93-contrib
postgresql93-libs
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration

The above seems to be part of the problem. Looks like you have two
repositories for pgdg93.

Are you sure the AMI did not already have a repo for Postgres?

Repository pgdg93-source is listed more than once in the configuration

8 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgresql93.x86_64 0:9.3.10-1PGDG.rhel7 will be installed

The above would seem to be the second problem and related to the first.
When I peeked into:

http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-ami201503-93-9.3-2.noarch.rpm

it showed that it was looking for:

https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-$basearch

Seems you are trying to install a RH 7 package on an OS that is looking
for a RH 6 package. In other words yum is finding the RH 7 repo before the
RH 6 repo.

---> Package postgresql93-contrib.x86_64 0:9.3.10-1PGDG.rhel7 will be

installed
---> Package postgresql93-libs.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
---> Package postgresql93-server.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql93-server-9.3.10-1PGDG.rhel7.x86_64 (pgdg93)
Requires: systemd-units
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

----------------------------------------------------------------------------------------

The --skip-broken option returns Errno 256
# yum -y install --skip-broken postgresql93 postgresql93-server
postgresql93-contrib postgresql93-libs
.
.
.
Error downloading packages:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno
256] No more mirrors to try.
postgresql93-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256] No
more mirrors to try.
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256]
No more mirrors to try.

----------------------------------------------------------------------------------------

I've tried quite a few other things, but now I'm back to the same
error. Do you have any suggestions?

Thank you,
Augori

--
Adrian Klaver
adrian.klaver@aklaver.com

#4Pierre HILBERT
pierre.hilbert@decathlon.com
In reply to: Augori (#3)
Re: Trouble installing postgresql server on Amazon Linux

Hello,

Are u sur that it's not a network issue ?
Maybe just try to telnet or check your ec2 security group.

Pierre

*Pierre HILBERT*
*Database Responsible | Decatec*
*Phone : +33 6 67 63 54 87*

On Sun, Feb 7, 2016 at 10:35 PM, Augori <augori@gmail.com> wrote:

Show quoted text

Thanks for the reply. Yes, it seems that you're right about having
multiple pgdg93 repos,.

# yum repolist
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration
Repository pgdg93-source is listed more than once in the configuration
8 packages excluded due to repository priority protections
repo id repo name
status
!amzn-main/latest amzn-main-Base
5,443+50
!amzn-updates/latest amzn-updates-Base
692+48
percona-release-noarch/latest Percona-Release YUM repository -
n 37
percona-release-x86_64/latest/x86_64 Percona-Release YUM repository - x
724+4
pgdg93/x86_64 PostgreSQL 9.3 - Amazon Linux AMI
284+4
repolist: 7,180

Can you suggest how I can go about removing the duplicate?
# ls -l /etc/yum.repos.d /etc/yum.repos.d
/etc/yum.repos.d:
total 36
-rw-r--r-- 1 root root 696 Feb 2 17:52 amzn-main.repo
-rw-r--r-- 1 root root 328 Sep 16 00:48 amzn-nosrc.repo
-rw-r--r-- 1 root root 694 Sep 16 00:48 amzn-preview.repo
-rw-r--r-- 1 root root 714 Feb 2 17:52 amzn-updates.repo
-rw-r--r-- 1 root root 957 Mar 1 2013 epel.repo
-rw-r--r-- 1 root root 1056 Mar 1 2013 epel-testing.repo
-rw-r--r-- 1 root root 2501 Sep 22 2014 percona-release.repo
-rw-r--r-- 1 root root 490 Oct 21 09:07 pgdg-93-ami201503.repo
-rw-r--r-- 1 root root 442 May 8 2013 pgdg-93-redhat.repo

... In fact, it seems like both of them must be the wrong repos? So I
need to remove these?
# rpm -e pgdg-93-redhat.repo
error: package pgdg-93-redhat.repo is not installed
# rpm -e pgdg-93-ami201503.repo
error: package pgdg-93-ami201503.repo is not installed

On Sun, Feb 7, 2016 at 2:52 PM, Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

On 02/07/2016 11:18 AM, Augori wrote:

Hello,

I'm trying to install postgresql on an Amazon Linux AMI release
2015.09. I got the rpm for Amazon Linux AMI 2015.03 - x86_64 under
PostgreSQL 9.3 linked here:
http://yum.postgresql.org/repopackages.php

But a yum install complains that it requires systemd-units, which I
haven't figure out how to get. The yum command and result:

]# yum -y install postgresql93 postgresql93-server postgresql93-contrib
postgresql93-libs
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration

The above seems to be part of the problem. Looks like you have two
repositories for pgdg93.

Are you sure the AMI did not already have a repo for Postgres?

Repository pgdg93-source is listed more than once in the configuration

8 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postgresql93.x86_64 0:9.3.10-1PGDG.rhel7 will be installed

The above would seem to be the second problem and related to the first.
When I peeked into:

http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-ami201503-93-9.3-2.noarch.rpm

it showed that it was looking for:

https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-$basearch

Seems you are trying to install a RH 7 package on an OS that is looking
for a RH 6 package. In other words yum is finding the RH 7 repo before the
RH 6 repo.

---> Package postgresql93-contrib.x86_64 0:9.3.10-1PGDG.rhel7 will be

installed
---> Package postgresql93-libs.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
---> Package postgresql93-server.x86_64 0:9.3.10-1PGDG.rhel7 will be
installed
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Processing Dependency: systemd-units for package:
postgresql93-server-9.3.10-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql93-server-9.3.10-1PGDG.rhel7.x86_64 (pgdg93)
Requires: systemd-units
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

----------------------------------------------------------------------------------------

The --skip-broken option returns Errno 256
# yum -y install --skip-broken postgresql93 postgresql93-server
postgresql93-contrib postgresql93-libs
.
.
.
Error downloading packages:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-contrib-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno
256] No more mirrors to try.
postgresql93-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256] No
more mirrors to try.
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64: failure:
postgresql93-libs-9.3.10-1PGDG.rhel7.x86_64.rpm from pgdg93: [Errno 256]
No more mirrors to try.

----------------------------------------------------------------------------------------

I've tried quite a few other things, but now I'm back to the same
error. Do you have any suggestions?

Thank you,
Augori

--
Adrian Klaver
adrian.klaver@aklaver.com

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Augori (#3)
Re: Trouble installing postgresql server on Amazon Linux

On 02/07/2016 01:35 PM, Augori wrote:

Thanks for the reply. Yes, it seems that you're right about having
multiple pgdg93 repos,.

# yum repolist
Loaded plugins: priorities, update-motd, upgrade-helper
Repository pgdg93 is listed more than once in the configuration
Repository pgdg93-source is listed more than once in the configuration
8 packages excluded due to repository priority protections
repo id repo name
status
!amzn-main/latest amzn-main-Base
5,443+50
!amzn-updates/latest
amzn-updates-Base 692+48
percona-release-noarch/latest Percona-Release YUM repository -
n 37
percona-release-x86_64/latest/x86_64 Percona-Release YUM repository -
x 724+4
pgdg93/x86_64 PostgreSQL 9.3 - Amazon Linux
AMI 284+4
repolist: 7,180

Can you suggest how I can go about removing the duplicate?
# ls -l /etc/yum.repos.d /etc/yum.repos.d
/etc/yum.repos.d:
total 36
-rw-r--r-- 1 root root 696 Feb 2 17:52 amzn-main.repo
-rw-r--r-- 1 root root 328 Sep 16 00:48 amzn-nosrc.repo
-rw-r--r-- 1 root root 694 Sep 16 00:48 amzn-preview.repo
-rw-r--r-- 1 root root 714 Feb 2 17:52 amzn-updates.repo
-rw-r--r-- 1 root root 957 Mar 1 2013 epel.repo
-rw-r--r-- 1 root root 1056 Mar 1 2013 epel-testing.repo
-rw-r--r-- 1 root root 2501 Sep 22 2014 percona-release.repo
-rw-r--r-- 1 root root 490 Oct 21 09:07 pgdg-93-ami201503.repo
-rw-r--r-- 1 root root 442 May 8 2013 pgdg-93-redhat.repo

... In fact, it seems like both of them must be the wrong repos? So I
need to remove these?
# rpm -e pgdg-93-redhat.repo
error: package pgdg-93-redhat.repo is not installed
# rpm -e pgdg-93-ami201503.repo
error: package pgdg-93-ami201503.repo is not installed

Well these are repos not packages.

I do not use YUM as I am not a RH user, but I did find this:

http://www.if-not-true-then-false.com/2010/yum-remove-repo-repository-yum-disable-repo-repository/

--
Adrian Klaver
adrian.klaver@aklaver.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6John R Pierce
pierce@hogranch.com
In reply to: Augori (#3)
Re: Trouble installing postgresql server on Amazon Linux

On 2/7/2016 1:35 PM, Augori wrote:

... In fact, it seems like both of them must be the wrong repos? So I
need to remove these?
# rpm -e pgdg-93-redhat.repo
error: package pgdg-93-redhat.repo is not installed
# rpm -e pgdg-93-ami201503.repo
error: package pgdg-93-ami201503.repo is not installed

these commands will tell you what package those files came from...

$ rpm -qf /etc/yum.repos.d/pgdg-93-redhat.repo
$ rpm -qf /etc/yum.repos.d/pgdg-93-ami201503.repo

--
john r pierce, recycling bits in santa cruz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general