Skip to main content

Easyapache4 flag error

Comments

13 comments

  • rbairwell

    The PostgreSQL RPM repository updated its GPG security keys on the 3rd of January this year which may be the cause of your issues. According to https://yum.postgresql.org/news/pgdg-rpm-repo-gpg-key-update/ to fix this on a RockyLinux 8 machine, try running:

     dnf --disablerepo=* -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm

    (which is very nearly what you had).

    If you've tried that, please let us know!

    0
  • chepegeek

    I keep getting the same error, as a comment my operating system is Almalinux 8.

    Imunify360 ea-php Hardened repository for CentOS 8 - x86_64    1.3 MB/s | 2.6 MB     00:02
    kernelcare                                                     7.3 kB/s | 8.0 kB     00:01
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64             2.2 kB/s | 659  B     00:00
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64             1.6 MB/s | 1.7 kB     00:00
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64             2.7 kB/s | 659  B     00:00
    Error: Failed to download metadata for repo 'pgdg-common': repomd.xml GPG signature verification error: Bad GPG signature
    [root@servidor ~]#

     

     

     

    0
  • rbairwell

    Hmm, I've just tried an install of PostgreSQL on my AlmaLinux 8.9 server (surprised I didn't already have it installed) and I couldn't see it using the pgdg-common repo: did you initially install PostgreSQL via the instructions on https://docs.cpanel.net/knowledge-base/sql/install-or-update-postgresql-on-your-cpanel-server/ (i.e. using /usr/local/cpanel/scripts/installpostgres ) or did you install it "manually"?

    I'm going to assume you installed it manually and that:

    yum list postgresql-server

    returns (in the right side column) the repository "pgdg-common" instead of @appstream (as it is on my install).

    Can you try

    grep gpgkey /etc/yum.repos.d/pgdg-redhat-all.repo

    You should get lines back saying:

    file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-AARCH64-RHEL

    That confirms the repository is pointing at the correct GPG key. Now try:

    md5sum /etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-AARCH64-RHEL

    is the hash at the start 30100de7982a148ab49e2e7a7d710ad2 ? If not, you'll need to download the key from https://download.postgresql.org/pub/repos/yum/keys/ and manually overwrite that file 

     

     

    0
  • chepegeek

    I don't have that key, Is there a way to have the cpanel officials, I honestly don't remember if it was me who installed them manually.

    [root@servidor ~]# yum list postgresql-server
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64                  731  B/s | 659  B     00:00
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64                  1.6 MB/s | 1.7 kB     00:00
    PostgreSQL common RPMs for RHEL / Rocky 8 - x86_64                  756  B/s | 659  B     00:00
    Error: Failed to download metadata for repo 'pgdg-common': repomd.xml GPG signature verification error: Bad GPG signature
    [root@servidor ~]# grep gpgkey /etc/yum.repos.d/pgdg-redhat-all.repo
    #gpgkey=https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG-13
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG

     

     

     

     

    0
  • cPRex Jurassic Moderator

    Can you post the output of the following command?

    cat /etc/redhat-release
    0
  • chepegeek
    root@servidor ~]# cat /etc/redhat-release
    AlmaLinux release 8.9 (Midnight Oncilla)
    0
  • cPRex Jurassic Moderator

    That's interesting - does this command show any output?

    grep -Ri rocky /etc/yum.repos.d/

    If so, you'll likely need to disable those repositories on your machine as you're using AlmaLinux and not RockyLinux.

    0
  • chepegeek

    I have obtained the following results, please help me deactivate those repositories and only keep the official cpanel ones, thank you.

    [root@servidor ~]# grep -Ri rocky /etc/yum.repos.d/
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG Red Hat Enterprise Linux / Rocky / AlmaLinux repositories.  #
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG Red Hat Enterprise Linux / Rocky stable common repository for all PostgreSQL versions
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL Supplementary ucommon RPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=Extra packages to support some RPMs in the PostgreSQL RPM repo for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG Red Hat Enterprise Linux / Rocky stable repositories:
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG RHEL / Rocky Updates Testing common repositories.
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL common testing RPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG RHEL / Rocky Updates Testing repositories. (These packages should not be used in production)
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 17 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG Red Hat Enterprise Linux / Rocky SRPM testing common repository
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:# PGDG RHEL / Rocky testing common SRPM repository for all PostgreSQL versions
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL common testing SRPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 17 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source updates testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Source update testing
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 17 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 14 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 13 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo.rpmnew:name=PostgreSQL 12 for RHEL / Rocky / AlmaLinux $releasever - $basearch - Debuginfo
    /etc/yum.repos.d/pgdg-redhat-all.repo:# PGDG Red Hat Enterprise Linux / Rocky repositories  #
    /etc/yum.repos.d/pgdg-redhat-all.repo:# PGDG Red Hat Enterprise Linux / Rocky stable common repository for all PostgreSQL versions
    /etc/yum.repos.d/pgdg-redhat-all.repo:name=PostgreSQL common RPMs for RHEL / Rocky $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo:name=PostgreSQL Supplementary ucommon RPMs for RHEL / Rocky $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo:name=Extra packages to support some RPMs in the PostgreSQL RPM repo RHEL / Rocky $releasever - $basearch
    /etc/yum.repos.d/pgdg-redhat-all.repo:# PGDG Red Hat Enterprise Linux / Rocky stable repositories:

     

     

     

    0
  • cPRex Jurassic Moderator

    So the good news is that it looks like it's just that one repository.  Do you know if you are using PostGreSQL on your machine?  I would recommend doing the following:

    -confirm you are not using PostGreSQL on your system
    -uninstall PostGreSQL
    -disable the repo with the following details: https://support.cpanel.net/hc/en-us/articles/360054840794-How-do-I-enable-or-disable-a-repository

    If you need to reinstall PostGreSQL you can run /usr/local/cpanel/scripts/installpostgres to install the cPanel-supported version.

    0
  • chepegeek

    If PostGreSQL is currently being used in two domains, any recommendations? What to do in these cases, thank you.

    0
  • cPRex Jurassic Moderator

    What is the output of this?

    psql -V
    0
  • chepegeek
    root@servidor ~]# psql -V
    psql: /lib64/libpq.so.5: no version information available (required by psql)
    psql (PostgreSQL) 9.6.22
    [root@servidor ~]#
    0
  • cPRex Jurassic Moderator

    Thanks for the information.  I have confirmed that removing the software does not touch any of the data inside /var/lib/pgsql. However, you should have a backup of your data before making any changes to the server.

    I would remove the *non-cpanel* PostGreSQL packages from the machine.  You can find those by running this command:

    rpm -qa | grep -i postgres

    and then use the following command to remove those packages.  This is one example, although yours will be named slightly differently:

    yum remove postgresql-server
    yum remove postgresql-9.6.22-1.module_el8.4.0+2479+beebcf7e.x86_64

    *Do not* remove the cpanel-postgresql packages from the machine.

    After that is done, you can disable the repository using the details here:

    https://support.cpanel.net/hc/en-us/articles/360054840794-How-do-I-enable-or-disable-a-repository

    and then install the supported version of PostGreSQL with this command:

    /scripts/installpostgres

    At this point I would expect the server to have the proper version of PostGreSQL installed and future Yum updates to work properly on the system.

    0

Please sign in to leave a comment.