My system on server is:
$ lsb_release -d
Description: Red Hat Enterprise Linux Server release 7.5 (Maipo)
Generally I have a Dockerized running postgres:11 database on this server and roughly speaking I need to create a database dump from it.
By typing:
$ sudo yum install postgresql
I can install postgresql clinet (that includes pg_dump, psql, etc) in version 9. But it can't create a dump from postgresql:11 database, so I found advice in: https://www.symmcom.com/docs/how-tos/databases/how-to-install-postgresql-11-x-on-centos-7
I did step-by-step:
step 1: $ sudo yum update -y # I didn't sudo reboot as I wanted to avoid server to not start again and ghaving to ask IT support for restarting it for me
step 2: $ sudo rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
step 3: $ sudo yum install postgresql11 -y
What's weird - for the first time it installed and worked. However, after logout/login I still had originally preinstalled postgresql:9 as the first choice, so I removed all postgresql with yum remove postgresql postgresql11
I tried again to do execute above steps from 1-3 but I get:
$ sudo yum install postgresql11 -y
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos
This system is not registered with RHN Classic or Red Hat Satellite.
You can use rhn_register to register.
Red Hat Satellite or RHN Classic support will be disabled.
No package postgresql11 available.
Error: Nothing to do
Can you help me why the package postgresql11 isn't seen when I try yo install it again?
I tried to clean up cache of yum but doesn't help.
Logs from yum list:
$ sudo yum list | grep postgresql
This system is not registered with RHN Classic or Red Hat Satellite.
You can use rhn_register to register.
Red Hat Satellite or RHN Classic support will be disabled.
postgresql.x86_64 9.2.24-2.el7_7 @GSS-RHEL7
postgresql-devel.x86_64 9.2.24-2.el7_7 @GSS-RHEL7
postgresql-libs.x86_64 9.2.24-2.el7_7 @GSS-RHEL7
postgresql11-libs.x86_64 11.7-1PGDG.rhel7 @pgdg11
qt-postgresql.x86_64 1:4.8.7-4.el7 @GSS-RHEL7
qt5-qtbase-postgresql.x86_64 5.9.7-2.el7 @GSS-RHEL7
freeradius-postgresql.x86_64 3.0.13-10.el7_6 GSS-RHEL7-optional
libreoffice-postgresql.x86_64 1:5.3.6.1-21.el7 GSS-RHEL7-optional
pcp-pmda-postgresql.x86_64 4.3.2-4.el7_7 GSS-RHEL7
postgresql.i686 9.2.24-2.el7_7 GSS-RHEL7
postgresql-contrib.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-devel.i686 9.2.24-2.el7_7 GSS-RHEL7
postgresql-docs.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-jdbc.noarch 9.2.1002-6.el7_5 GSS-RHEL7
postgresql-jdbc-javadoc.noarch 9.2.1002-6.el7_5 GSS-RHEL7-optional
postgresql-libs.i686 9.2.24-2.el7_7 GSS-RHEL7
postgresql-odbc.x86_64 09.03.0100-2.el7 GSS-RHEL7
postgresql-plperl.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-plpython.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-pltcl.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-server.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-static.i686 9.2.24-2.el7_7 GSS-RHEL7-optional
postgresql-static.x86_64 9.2.24-2.el7_7 GSS-RHEL7-optional
postgresql-test.x86_64 9.2.24-2.el7_7 GSS-RHEL7
postgresql-upgrade.x86_64 9.2.24-2.el7_7 GSS-RHEL7-optional
qt-postgresql.i686 1:4.8.7-4.el7 GSS-RHEL7
qt5-qtbase-postgresql.i686 5.9.7-2.el7 GSS-RHEL7
postgresql11-libspackage, so it most likely worked the first time. Also, your system isn’t getting updates from Red Hat so it might not work since your OS is several years out of date.rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm --replacepkgsit helped.