Registering via subscription-manager -- with Redhat?

Hello,
Today I was attempting to install postGIS packages (among many other things) on my newly-installed almalinux 8.5 server. I succeeded, but to do so I had to register my server with Redhat, and I don’t understand why that would be necessary. Perhaps you folks can tell me where I went astray and what to do differently?

My initial attempts failed due to lack of “libgdal.so.30”:


[root@geo1 ~]# dnf install postgis32_14.x86_64 postgis32_14-client.x86_64 . . .
. . .
Error:
Problem 1: package postgis32_14-client-3.2.0-1.rhel8.x86_64 requires libgdal.so.30()(64bit), but none of the providers can be installed

  • cannot install the best candidate for the job
  • nothing provides libdap.so.25()(64bit) needed by gdal34-libs-3.4.0-1.rhel8.x86_64
  • nothing provides libdapclient.so.6()(64bit) needed by gdal34-libs-3.4.0-1.rhel8.x86_64
  • nothing provides libdapserver.so.7()(64bit) needed by gdal34-libs-3.4.0-1.rhel8.x86_64

When I installed postGIS on a RHEL 8.5 Server, these prerequisites came from the “Red Hat CodeReady Linux Builder for RHEL 8” repository. The almalinux wiki tells me that this is the almalinux “Powertools” repository, which I need to ‘activate’ via:

dnf config-manager --set-enabled powertools

So I tried that and got the following results:


[root@geo1 ~]# dnf config-manager --set-enabled powertools
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

[root@geo1 ~]#


Similar verbiage accompanies all my failed dnf install attempts. So, I installed the subscription-manager packages via dnf, and tried to register. It failed several times with a certificate verification error until I disabled checking in /etc/rhsm/rhsm.conf. Then I got the following:


[root@geo1 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: me
Password:
The system has been registered with ID: 5f4a17a7-aa02-4c0b-80cb-d6059824c75c
The registered system name is: geo1
[root@geo1 ~]# dnf config-manager --set-enabled powertools
Updating Subscription Management repositories.

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.


After that, I was able to install my postGIS packages, with a whole bunch of prerequisites coming from the “Powertools” repository. But now, my almalinux server is listed as one of the sixteen I’m allowed to have via my free “RedHat Individual Developer” subscription!

So, is this the only way I can use the “PowerTools” repository in almalinux ?? It kind of defeats the purpose of installing almalinux is the first place! When I ran subscription-manager, I would’ve hoped that I would be registering or subscribing or whatever with some entity within almalinux rather than Redhat, but when I look at /etc/rhsm/rhsm.conf all I see is RedHat this and Redhat that.

Does almalinux have a way to enable the “Powertools” (and perhaps other) repositories that does not involve subscribing/registering with Redhat?

That command in itself does not do anything with subscription manager.

Have you, by any chance, installed subscription-manager or similar packages?
Some things pull those as dependencies. They do add “dnf plugin” and then dnf command gives those burbs. The plugin can be disabled (if it cannot be removed).

There definitely is no need to register to Red Hat. Not for any AlmaLinux package.

1 Like

Hello jlehtone,

Yes, I had already installed subscription-manager packages when I tried to enable the CodeReady Builder repo (which is what you have to do on Redhat) and it came back “not found”:


[root@geo1 ~]# subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
bash: subscription-manager: command not found…


You mean, if I had not installed those things the “powertools” repo would have been usable?

I’m not an expert on .repo files, but almalinux-powertools.repo already had the base repo enabled, before I ran the “subscription-manager register”, and dnf still wouldn’t use it or include it in a ‘repolist’ command. The “source” and “debuginfo” blocks were not enabled:

[root@geo1 yum.repos.d]# cat almalinux-powertools.repo 
# almalinux-powertools.repo

[powertools]
name=AlmaLinux $releasever - PowerTools
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools
# baseurl=https://repo.almalinux.org/almalinux/$releasever/PowerTools/$basearch/os/
enabled=1
gpgcheck=1
countme=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux

## Sources
[powertools-source]
name=AlmaLinux $releasever - PowerTools Source
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-source
# baseurl=https://repo.almalinux.org/almalinux/$releasever/PowerTools/Source/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux

## Debuginfo
[powertools-debuginfo]
name=AlmaLinux $releasever - PowerTools debuginfo
mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-debuginfo
# baseurl=https://repo.almalinux.org/almalinux/$releasever/PowerTools/debug/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
[root@geo1 yum.repos.d]#

That says powertools is enabled for your system. The issue is that I don’t see the gdal34-libs in either RHEL8 repositories or AlmaLinux nor did I find it on the CentOS tree. It seems to be shipped in the CentOS 8 - PostgreSQL Common x86_64 but I don’t know where they get their packages from.

Hello ssmoogen,
I wish I had saved the output from when dnf finally did successfully install the postGIS software, but I can tell you it did find everything it needed, some things coming from the almalinux Powertools repository, and many from other places.

I guess that I never should’ve installed the “subscription management” packages. They probably were what made the the “dnf config-manager --set-enabled powertools” command want me to register with RedHat, per jlehtone above. Maybe almalinux can just leave them out of the repository?

This will not be the last time I install almalinux. Next time I’ll try enabling the powertools repository with no subscription-manager packages installed, and see what happens.

subscription-manager is a default in the upstream RHEL so it was shipped in CentOS and has been available in Alma and Rocky. There are people who use Red Hat satellite to manage their alma/rocky/centos systems so having subscription manager in the repos is useful. However for most people, I would recommend doing a

yum --noautoremove remove dnf-plugin-subscription-manager subscription-manager subscription-manager-rhsm-certificates python3-subscription-manager-rhsm

This will stop the messages that you were getting. I am guessing for your previous postgis you may have followed steps similar to Postgres12 on c8 and Postgris3 on c8

The dnf remembers some of that in its history. See:

sudo dnf history
sudo dnf history list postgis32_14
sudo dnf history info $ID

where $ID is interesting dnf transaction ID that you saw with the two previous commands.

Hello jlehtone and @ssmoogen ,

I ran the dnf (instead of yum) remove command for the subscription-manager stuff, and that did make the dnf registration messages go away.

And below is the output for “dnf history info 19”. The gdal34 libraries came from the @pgdg-common repository:

root@geo1 ~]# dnf history info 19
Transaction ID : 19
Begin time     : Tue 28 Dec 2021 03:23:08 PM EST
Begin rpmdb    : 1941:39f3b9d473dc69157ff52d2c2f2e82abb828b6a3
End time       : Tue 28 Dec 2021 03:23:45 PM EST (37 seconds)
End rpmdb      : 1990:711b2716426fabfb5f2b492daebab7b62a973ed1
User           : Kurt <kurt>
Return-Code    : Success
Releasever     : 8
Command Line   : install postgis32_14.x86_64 postgis32_14-client.x86_64 postgis32_14-devel.x86_64 postgis32_14-docs.x86_64 postgis32_14-gui.x86_64 postgis32_14-utils.x86_64
Comment        : 
Packages Altered:
    Install atlas-3.10.3-8.el8.x86_64                  @baseos
    Install libgfortran-8.5.0-4.el8_5.alma.x86_64      @baseos
    Install libquadmath-8.5.0-4.el8_5.alma.x86_64      @baseos
    Install libusb-1:0.1.5-12.el8.x86_64               @baseos
    Install blas-3.8.0-8.el8.x86_64                    @appstream
    Install boost-serialization-1.66.0-10.el8.x86_64   @appstream
    Install lapack-3.8.0-8.el8.x86_64                  @appstream
    Install libtiff-devel-4.0.9-20.el8.x86_64          @appstream
    Install openblas-0.3.12-1.el8.x86_64               @appstream
    Install openblas-threads-0.3.12-1.el8.x86_64       @appstream
    Install SuperLU-5.2.0-7.el8.x86_64                 @powertools
    Install libaec-1.0.2-3.el8.x86_64                  @powertools
    Install libdap-3.19.1-2.el8.x86_64                 @powertools
    Install openblas-openmp-0.3.12-1.el8.x86_64        @powertools
    Install openblas-threads64_-0.3.12-1.el8.x86_64    @powertools
    Install armadillo-9.700.2-1.el8.x86_64             @epel
    Install arpack-3.7.0-1.el8.x86_64                  @epel
    Install cfitsio-3.47-1.el8.x86_64                  @epel
    Install freexl-1.0.6-4.el8.x86_64                  @epel
    Install gpsbabel-1.6.0-3.el8.x86_64                @epel
    Install hdf-4.2.14-5.el8.x86_64                    @epel
    Install hdf5-1.10.5-4.el8.x86_64                   @epel
    Install libbsd-0.9.1-4.el8.x86_64                  @epel
    Install libgta-1.2.1-1.el8.x86_64                  @epel
    Install minizip-2.8.9-2.el8.x86_64                 @epel
    Install netcdf-4.7.0-2.el8.x86_64                  @epel
    Install shapelib-1.5.0-1.el8.x86_64                @epel
    Install xerces-c-3.2.2-3.el8.x86_64                @epel
    Install CGAL-4.14-1.rhel8.x86_64                   @pgdg-common
    Install SFCGAL-1.3.7-2.rhel8.x86_64                @pgdg-common
    Install SFCGAL-libs-1.3.7-2.rhel8.x86_64           @pgdg-common
    Install gdal34-libs-3.4.0-1.rhel8.x86_64           @pgdg-common
    Install geos310-3.10.1-1.rhel8.x86_64              @pgdg-common
    Install geos39-3.9.2-1.rhel8.x86_64                @pgdg-common
    Install libgeotiff16-1.6.0-5.rhel8.x86_64          @pgdg-common
    Install libgeotiff16-devel-1.6.0-5.rhel8.x86_64    @pgdg-common
    Install librttopo-1.1.0-1.rhel8.x86_64             @pgdg-common
    Install libspatialite50-5.0.1-3.rhel8.x86_64       @pgdg-common
    Install libspatialite50-devel-5.0.1-3.rhel8.x86_64 @pgdg-common
    Install ogdi41-4.1.0-2.rhel8.x86_64                @pgdg-common
    Install proj80-8.0.1-1.rhel8.x86_64                @pgdg-common
    Install proj81-8.1.1-1.rhel8.x86_64                @pgdg-common
    Install proj82-8.2.0-1.rhel8.x86_64                @pgdg-common
    Install postgis32_14-3.2.0-1.rhel8.x86_64          @pgdg14
    Install postgis32_14-client-3.2.0-1.rhel8.x86_64   @pgdg14
    Install postgis32_14-devel-3.2.0-1.rhel8.x86_64    @pgdg14
    Install postgis32_14-docs-3.2.0-1.rhel8.x86_64     @pgdg14
    Install postgis32_14-gui-3.2.0-1.rhel8.x86_64      @pgdg14
    Install postgis32_14-utils-3.2.0-1.rhel8.x86_64    @pgdg14
[root@geo1 ~]# 
- - -

Ah, those are PostgreSQL’s repositories and they have split packages that are common to all pg versions into the “common” repo. https://yum.postgresql.org/

PS. yum is an alias (or symlink) to dnf; they are the same “command”.

@kurt19001 , could you please provide the output of

rpm -qpi  postgis32_14.x86_64.rpm
rpm -qpi  postgis32_14-client.x86_64

You could also instead provide the output since the packages are already installed using:

rpm -qi  postgis32_14.x86_64 
rpm -qi  postgis32_14-client.x86_64

This will tell us potentially who the author, perhaps Red Hat, of the packages are which might tell us why you were required to use subscription-manager.

I am trying to catch up on the rest of the post(s).

Hello warron.french,

Sure:

[kurt@geo1 ~]$ rpm -qi  postgis32_14.x86_64
Name        : postgis32_14
Version     : 3.2.0
Release     : 1.rhel8
Architecture: x86_64
Install Date: Tue 28 Dec 2021 03:23:42 PM EST
Group       : Unspecified
Size        : 36487251
License     : GPLv2+
Signature   : DSA/SHA1, Tue 21 Dec 2021 06:02:56 AM EST, Key ID 1f16d2e1442df0f8
Source RPM  : postgis32_14-3.2.0-1.rhel8.src.rpm
Build Date  : Tue 21 Dec 2021 06:00:24 AM EST
Build Host  : koji-rhel8-x86-64-pgbuild
Relocations : (not relocatable)
Vendor      : PostgreSQL Global Development Group
URL         : https://www.postgis.net/
Summary     : Geographic Information Systems Extensions to PostgreSQL
Description :
PostGIS adds support for geographic objects to the PostgreSQL object-relational
database. In effect, PostGIS "spatially enables" the PostgreSQL server,
allowing it to be used as a backend spatial database for geographic information
systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS
follows the OpenGIS "Simple Features Specification for SQL" and has been
certified as compliant with the "Types and Functions" profile.
[kurt@geo1 ~]$ 
[kurt@geo1 ~]$ rpm -qi  postgis32_14-client.x86_64
Name        : postgis32_14-client
Version     : 3.2.0
Release     : 1.rhel8
Architecture: x86_64
Install Date: Tue 28 Dec 2021 03:23:43 PM EST
Group       : Unspecified
Size        : 1474544
License     : GPLv2+
Signature   : DSA/SHA1, Tue 21 Dec 2021 06:02:57 AM EST, Key ID 1f16d2e1442df0f8
Source RPM  : postgis32_14-3.2.0-1.rhel8.src.rpm
Build Date  : Tue 21 Dec 2021 06:00:24 AM EST
Build Host  : koji-rhel8-x86-64-pgbuild
Relocations : (not relocatable)
Vendor      : PostgreSQL Global Development Group
URL         : https://www.postgis.net/
Summary     : Client tools and their libraries of PostGIS
Description :
The postgis32_14-client package contains the client tools and their libraries
of PostGIS.
[kurt@geo1 ~]$ 

Thanks @kurt19001 , could you please execute the following command against both packages as well?

rpm  -q package_name  --queryformat "%{name}\t%{packager}\n"

What does the output look like? I think the problem is that the vendors of the two packages are not coming from ALMA Linux explicitly, and I believe @jlehtone already hit on this point.

Hello @warron.french ,

Here is the output:

[kurt@geo1 ~]$
[kurt@geo1 ~]$ rpm -q postgis32_14.x86_64 --queryformat “%{name}\t%{packager}\n”
postgis32_14 (none)
[kurt@geo1 ~]$ rpm -q postgis32_14-client.x86_64 --queryformat “%{name}\t%{packager}\n”
postgis32_14-client (none)
[kurt@geo1 ~]$
[kurt@geo1 ~]$

Sorry for the delay, I didn’t even power up the machine over the weekend.

All good @kurt19001, I don’t blame you.

The fact that there is not specified “packager” for the package doesn’t really mean too much I guess.

That tells me the packages didn’t come from CentOS or ALMA; not sure about what Rocky does yet. I use their distro as well but am more inclined to using ALMA nowadays. The Community Forums and Chat site are much easier to work with.

Hi @warron.french ,
Those packages come from repositories maintained by the PostgreSQL project itself. The normal repositories for every release of Centos and Redhat that I’ve ever dealt with also include PostgreSQL packages of some version, but the PostgreSQL people apparently invest a lot of effort in packaging the supported versions of their database software for a lot of different Linux distributions, as well as Windows, BSD, Mac & Solaris. If you want to run the latest version, they are the easiest option, starting at:

https://www.postgresql.org/download/

If you follow the “linux” link from there, you’ll get to a page where you can select “Red Hat Enterprise, Rocky, or Oracle Version 8” and get a wget link to install a yum/dnf repository. I’m pretty conservative about using 3rd-party repositories for software I run in production, but these have proven reliable for me on Centos, RHEL, and now AlmaLinux.

1 Like