Want to subscribe to topics you're interested in?
Become a Member

Postgresql error when running centmin - Failed to download metadata for repo 'pgdg12', 404

Discussion in 'Bug Reports' started by MaximilianKohler, Feb 4, 2026.

  1. MaximilianKohler

    MaximilianKohler Member

    214
    9
    18
    Jun 23, 2023
    Ratings:
    +39
    Local Time:
    4:53 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: AlmaLinux 9
    • Centmin Mod Version Installed: 140.00beta01
    • Nginx Version Installed: nginx/1.29.4
    • PHP Version Installed: PHP 8.2.30
    • MariaDB MySQL Version Installed: mysqladmin Ver 10.0 Distrib 10.6.24-MariaDB
    • Persistent Config:
      Code (Text):
      MARCH_TARGETNATIVE='n'        # Off for compatibility, on for speed.
      LETSENCRYPT_DETECT='y'        #
      VHOSTCTRL_CLOUDFLAREINC='y'   #
      NGINX_ZERODT='y'              # Zero downtime upgrades
      PHP_PGO='y'                   # Speed up php
      DEVTOOLSETTWELVE='y'        # GCC 12 https://community.centminmod.com/threads/22086/#post-101583
      DEVTOOLSETTHIRTEEN='n'        #
      PHP_ARGON='y'                 # Enable more secure Argon2 password hash algorithm. Recompile php after enabling.
      
      POSTGRESQL='y'          # Install PostgreSQL with PHP recompile
      POSTGRESQL_BRANCHVER='16'  # Stick with current version; upgrading is manual.
      NEEDRESTART_CHECK='y'   # Check if system needs to be rebooted after system updates
      
      # enable PHP latest version check on SSH logins MOTD
      # https://community.centminmod.com/threads/19540/
      DMOTD_PHPCHECK='y'
      
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'  # For Xenforo
      SELFSIGNEDSSL_ECDSA='y'
      PHPFINFO='y'
      PHP_OVERWRITECONF='n'
      PYTHON_INSTALL_ALTERNATIVES='y'
      
      MARCH_TARGETNATIVE='n'
      
      
      

    Code:
    cmupdate
    No local changes to save
    Updating ac40c68..f813541
    Fast-forward
     centmin-cli.sh         |  2 +-
     centmin.sh             |  2 +-
     inc/python_install.inc | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
     3 files changed, 63 insertions(+), 7 deletions(-)
    No local changes to save
    Already up to date.
    
    centmin
    /usr/local/src/centminmod ~
    
    Dependencies resolved.
    ==================================================================================================================================
     Package                                   Architecture          Version                          Repository                 Size
    ==================================================================================================================================
    Removing:
     python-unversioned-command                noarch                3.9.25-2.el9_7                   @appstream                 23
    
    Transaction Summary
    ==================================================================================================================================
    Remove  1 Package
    
    Freed space: 23
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                                          1/1
      Erasing          : python-unversioned-command-3.9.25-2.el9_7.noarch                                                         1/1
      Running scriptlet: python-unversioned-command-3.9.25-2.el9_7.noarch                                                         1/1
      Verifying        : python-unversioned-command-3.9.25-2.el9_7.noarch                                                         1/1
    
    Removed:
      python-unversioned-command-3.9.25-2.el9_7.noarch
    
    Complete!
    PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64                                             2.2 kB/s | 146  B     00:00
    Errors during downloading metadata for repository 'pgdg12':
      - Status code: 404 for https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-9-x86_64/repodata/repomd.xml (IP: 2a04:4e42:6b::820)
    Error: Failed to download metadata for repo 'pgdg12': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64                                             2.1 kB/s | 146  B     00:00
    Errors during downloading metadata for repository 'pgdg12':
      - Status code: 404 for https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-9-x86_64/repodata/repomd.xml (IP: 2a04:4e42:6b::820)
    Error: Failed to download metadata for repo 'pgdg12': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    PostgreSQL 12 for RHEL / Rocky / AlmaLinux 9 - x86_64                                             2.2 kB/s | 146  B     00:00
    Errors during downloading metadata for repository 'pgdg12':
      - Status code: 404 for https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-9-x86_64/repodata/repomd.xml (IP: 2a04:4e42:6b::820)
    Error: Failed to download metadata for repo 'pgdg12': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    
    Setup python3.11 and pip3.11 alternatives mapping
    you can reference pip for pip3.11
    you can reference python for python3.11
    python                  manual  /usr/bin/python3.11
    pip                     manual  /usr/bin/pip3.11
    


     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:53 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Any reason for PostgreSQL 16 ? If not I updated 140.00beta01 with fixes and v18 default

    run cmupdate to pull fixes into 140.00beta01 install
    Code (Text):
    cmupdate


    set in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    POSTGRESQL='y'          # Install PostgreSQL with PHP recompile
    


    then try again but remove existing repo file first
    Code (Text):
    rm -f /etc/yum.repos.d/pgdg-redhat-all.repo
    
     
  3. MaximilianKohler

    MaximilianKohler Member

    214
    9
    18
    Jun 23, 2023
    Ratings:
    +39
    Local Time:
    4:53 PM
    Thanks! That worked.

    You instructed me to in the past: https://community.centminmod.com/threads/postgresql-wont-install.22086/#post-101563

     
  4. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:53 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+