Discover Centmin Mod today
Register Now

Error installing PostgreSQL via php upgrade

Discussion in 'Install & Upgrades or Pre-Install Questions' started by MaximilianKohler, Oct 26, 2023.

  1. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.25.3
    • PHP Version Installed: 8.1.22
    • MariaDB MySQL Version Installed: 10.4.31-MariaDB MariaDB Server
    • When was last time updated Centmin Mod code base ? : up to date.
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      cat /etc/centminmod/custom_config.inc
      
      MARCH_TARGETNATIVE='n'
      LETSENCRYPT_DETECT='y'
      VHOSTCTRL_CLOUDFLAREINC='y'
      NGINX_ZERODT='y'
      PHP_PGO='y'
      
      NGINX_ZERODT='y'
      
      ENABLE_MARIADBTENTWOUPGRADE='y'
      ENABLE_MARIADBTENTHREEUPGRADE='y'
      ENABLE_MARIADBTENFOURUPGRADE='y'
      
      NEEDRESTART_CHECK='y'
      POSTGRESQL='y'
      

    php_upgrade.log https://pastebin.com/FJzEiYLC

    Steps:
    Per the directions here https://community.centminmod.com/th...16-add-el8-el9-support-in-130-00beta01.24124/ I added "POSTGRESQL='y'" in config file at /etc/centminmod/custom_config.inc then ran centmin.sh menu option 5 update/recompile. I then typed in "psql" and got "command not found".
    Code:
    Current PHP Version: 8.1.22
    Latest PHP Version Installable: 8.1.25
    
    I chose to upgrade to 8.1.25 the first time. I ran "centmin.sh menu option 5" again and see that it didn't upgrade. I scrolled up and see there was an error. I tried again, sticking to v8.1.22 this time, and it still errored out.

    FYI I am doing this on a test server that I created using a snapshot of my main server. It currently doesn't have any website running on it.

     
  2. brijendrasial

    brijendrasial Active Member

    207
    154
    43
    Mar 21, 2018
    Ratings:
    +236
    Local Time:
    10:05 AM
    1.13.9
    10.0.22-MariaDB
    Transaction check error:
    file /usr/lib64/libpq.so.5 from install of libpq5-15.4-42PGDG.rhel7.x86_64 conflicts with file from package postgresql-libs-9.2.24-8.el7_9.x86_64
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Thanks for the heads up. Only really tested this updated routine on EL8/EL9 systems and not EL7 heh. Seems official PostgreSQL 16 YUM is only for EL8/EL9 https://pkgs.org/download/libpq.so.5()(64bit) and not EL7, so will have to double check

    Can you post the output you get from
    Code (Text):
    yum -q list postgresql* | tr -s ' ' | column -t

    For folks reading this message and yourself for posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)

    Looks like for CentOS 7, pure-ftpd YUM package install, postgresql-libs is a dependency YUM package that gets installed automatically as well and that conflicts with PostgreSQL 16 version's required libpq5 YUM package.

    Code (Text):
    yum -q history list postgresql-libs
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
       172 | update --disableplugin=p | 2022-07-05 13:41 | E, I, U        |   58 EE
       155 | -y update                | 2021-08-28 11:39 | E, I, U        |   62 EE
       122 | update --disableplugin=p | 2020-06-11 22:03 | E, I, U        |   39 
       105 | update --disableplugin=p | 2020-02-19 05:22 | E, I, U        |   57 
        74 | -q -y install pure-ftpd  | 2019-07-12 19:28 | Install        |    3
    

    Code (Text):
    yum -q history info 74
    Transaction ID : 74
    Begin time     : Fri Jul 12 19:28:53 2019
    Begin rpmdb    : 766:9c6cbe08759a3250dcdde39874211c0ef60dec93
    End time       :            19:28:54 2019 (1 seconds)
    End rpmdb      : 769:00def61a1509485d6bde8dc2d7f96eb84329ceec
    User           : root <root>
    Return-Code    : Success
    Command Line   : -q -y install pure-ftpd --disablerepo=rpmforge
    Transaction performed with:
        Updated       rpm-4.11.3-35.el7.x86_64                      @base
        Updated       yum-3.4.3-161.el7.centos.noarch               @base
        Updated       yum-plugin-fastestmirror-1.1.31-50.el7.noarch @base
        Updated       yum-plugin-versionlock-1.1.31-50.el7.noarch   @base
    Packages Altered:
        Dep-Install postgresql-libs-9.2.24-1.el7_5.x86_64 @base
        Install     pure-ftpd-1.0.47-2.el7.x86_64         @epel
        Dep-Install usermode-1.111-5.el7.x86_64           @base
    

    see
    Code (Text):
    Dep-Install postgresql-libs-9.2.24-1.el7_5.x86_64 @base


    postgresql-libs installs the following files
    Code (Text):
    rpm -ql postgresql-libs
    /usr/lib64/libecpg.so.6
    /usr/lib64/libecpg.so.6.4
    /usr/lib64/libecpg_compat.so.3
    /usr/lib64/libecpg_compat.so.3.4
    /usr/lib64/libpgtypes.so.3
    /usr/lib64/libpgtypes.so.3.3
    /usr/lib64/libpq.so.5
    /usr/lib64/libpq.so.5.5
    /usr/share/doc/postgresql-libs-9.2.24
    /usr/share/doc/postgresql-libs-9.2.24/COPYRIGHT
    /usr/share/locale/cs/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/cs/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/de/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/de/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/es/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/es/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/fr/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/fr/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/it/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/it/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/ja/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/ja/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/pl/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/pl/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/pt_BR/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/pt_BR/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/ru/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/ru/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/tr/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/tr/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/zh_CN/LC_MESSAGES/ecpglib6-9.2.mo
    /usr/share/locale/zh_CN/LC_MESSAGES/libpq5-9.2.mo
    /usr/share/locale/zh_TW/LC_MESSAGES/libpq5-9.2.mo
    
     
  4. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    Yeah, but you don't have inline code tags so that makes things more difficult and I stopped using them as much.

    Code:
    yum -q list postgresql* | tr -s ' ' | column -t
    Installed                                Packages
    postgresql-libs.x86_64                   9.2.24-8.el7_9          @updates
    Available                                Packages
    postgresql.x86_64                        9.2.24-8.el7_9          updates
    postgresql-contrib.x86_64                9.2.24-8.el7_9          updates
    postgresql-devel.x86_64                  9.2.24-8.el7_9          updates
    postgresql-docs.x86_64                   9.2.24-8.el7_9          updates
    postgresql-jdbc.noarch                   9.2.1002-8.el7_8        updates
    postgresql-jdbc-javadoc.noarch           9.2.1002-8.el7_8        updates
    postgresql-odbc.x86_64                   09.03.0100-2.el7        base
    postgresql-pgpool-II.x86_64              3.4.6-1.el7             epel
    postgresql-pgpool-II-devel.x86_64        3.4.6-1.el7             epel
    postgresql-pgpool-II-extensions.x86_64   3.4.6-1.el7             epel
    postgresql-plperl.x86_64                 9.2.24-8.el7_9          updates
    postgresql-plpython.x86_64               9.2.24-8.el7_9          updates
    postgresql-plruby.x86_64                 0.5.3-13.el7            epel
    postgresql-plruby-doc.x86_64             0.5.3-13.el7            epel
    postgresql-pltcl.x86_64                  9.2.24-8.el7_9          updates
    postgresql-server.x86_64                 9.2.24-8.el7_9          updates
    postgresql-static.x86_64                 9.2.24-8.el7_9          updates
    postgresql-test.x86_64                   9.2.24-8.el7_9          updates
    postgresql-unit11.x86_64                 7.2-1.rhel7             pgdg11
    postgresql-unit12.x86_64                 7.2-1.rhel7.1           pgdg12
    postgresql-unit13.x86_64                 7.2-1.rhel7.1           pgdg13
    postgresql-unit_11.x86_64                7.4-1.rhel7             pgdg11
    postgresql-unit_12.x86_64                7.4-1.rhel7             pgdg12
    postgresql-unit_13.x86_64                7.4-1.rhel7             pgdg13
    postgresql-unit_14.x86_64                7.4-1.rhel7             pgdg14
    postgresql-unit_15.x86_64                7.4-1.rhel7             pgdg15
    postgresql-upgrade.x86_64                9.2.24-8.el7_9          updates
    postgresql11.x86_64                      11.21-1PGDG.rhel7       pgdg11
    postgresql11-contrib.x86_64              11.21-1PGDG.rhel7       pgdg11
    postgresql11-devel.x86_64                11.21-1PGDG.rhel7       pgdg11
    postgresql11-docs.x86_64                 11.21-1PGDG.rhel7       pgdg11
    postgresql11-libs.x86_64                 11.21-1PGDG.rhel7       pgdg11
    postgresql11-llvmjit.x86_64              11.21-1PGDG.rhel7       pgdg11
    postgresql11-odbc.x86_64                 16.00.0000-1PGDG.rhel7  pgdg11
    postgresql11-plperl.x86_64               11.21-1PGDG.rhel7       pgdg11
    postgresql11-plpython.x86_64             11.21-1PGDG.rhel7       pgdg11
    postgresql11-plpython3.x86_64            11.21-1PGDG.rhel7       pgdg11
    postgresql11-pltcl.x86_64                11.21-1PGDG.rhel7       pgdg11
    postgresql11-server.x86_64               11.21-1PGDG.rhel7       pgdg11
    postgresql11-tcl.x86_64                  3.0.0-1.rhel7           pgdg11
    postgresql11-test.x86_64                 11.21-1PGDG.rhel7       pgdg11
    postgresql12.x86_64                      12.16-1PGDG.rhel7       pgdg12
    postgresql12-contrib.x86_64              12.16-1PGDG.rhel7       pgdg12
    postgresql12-devel.x86_64                12.16-1PGDG.rhel7       pgdg12
    postgresql12-docs.x86_64                 12.16-1PGDG.rhel7       pgdg12
    postgresql12-libs.x86_64                 12.16-1PGDG.rhel7       pgdg12
    postgresql12-llvmjit.x86_64              12.16-1PGDG.rhel7       pgdg12
    postgresql12-odbc.x86_64                 16.00.0000-1PGDG.rhel7  pgdg12
    postgresql12-odbc-debuginfo.x86_64       12.02.0000-1PGDG.rhel7  pgdg-common
    postgresql12-plperl.x86_64               12.16-1PGDG.rhel7       pgdg12
    postgresql12-plpython.x86_64             12.16-1PGDG.rhel7       pgdg12
    postgresql12-plpython3.x86_64            12.16-1PGDG.rhel7       pgdg12
    postgresql12-pltcl.x86_64                12.16-1PGDG.rhel7       pgdg12
    postgresql12-server.x86_64               12.16-1PGDG.rhel7       pgdg12
    postgresql12-tcl.x86_64                  3.0.0-1.rhel7           pgdg12
    postgresql12-test.x86_64                 12.16-1PGDG.rhel7       pgdg12
    postgresql13.x86_64                      13.12-1PGDG.rhel7       pgdg13
    postgresql13-contrib.x86_64              13.12-1PGDG.rhel7       pgdg13
    postgresql13-devel.x86_64                13.12-1PGDG.rhel7       pgdg13
    postgresql13-docs.x86_64                 13.12-1PGDG.rhel7       pgdg13
    postgresql13-libs.x86_64                 13.12-1PGDG.rhel7       pgdg13
    postgresql13-llvmjit.x86_64              13.12-1PGDG.rhel7       pgdg13
    postgresql13-odbc.x86_64                 16.00.0000-1PGDG.rhel7  pgdg13
    postgresql13-plperl.x86_64               13.12-1PGDG.rhel7       pgdg13
    postgresql13-plpython3.x86_64            13.12-1PGDG.rhel7       pgdg13
    postgresql13-pltcl.x86_64                13.12-1PGDG.rhel7       pgdg13
    postgresql13-server.x86_64               13.12-1PGDG.rhel7       pgdg13
    postgresql13-test.x86_64                 13.12-1PGDG.rhel7       pgdg13
    postgresql14.x86_64                      14.9-2PGDG.rhel7        pgdg14
    postgresql14-contrib.x86_64              14.9-2PGDG.rhel7        pgdg14
    postgresql14-devel.x86_64                14.9-2PGDG.rhel7        pgdg14
    postgresql14-docs.x86_64                 14.9-2PGDG.rhel7        pgdg14
    postgresql14-libs.x86_64                 14.9-2PGDG.rhel7        pgdg14
    postgresql14-llvmjit.x86_64              14.9-2PGDG.rhel7        pgdg14
    postgresql14-odbc.x86_64                 16.00.0000-1PGDG.rhel7  pgdg14
    postgresql14-plperl.x86_64               14.9-2PGDG.rhel7        pgdg14
    postgresql14-plpython3.x86_64            14.9-2PGDG.rhel7        pgdg14
    postgresql14-pltcl.x86_64                14.9-2PGDG.rhel7        pgdg14
    postgresql14-server.x86_64               14.9-2PGDG.rhel7        pgdg14
    postgresql14-tcl.x86_64                  3.0.0-1.rhel7           pgdg14
    postgresql14-test.x86_64                 14.9-2PGDG.rhel7        pgdg14
    postgresql15.x86_64                      15.4-1PGDG.rhel7        pgdg15
    postgresql15-contrib.x86_64              15.4-1PGDG.rhel7        pgdg15
    postgresql15-devel.x86_64                15.4-1PGDG.rhel7        pgdg15
    postgresql15-docs.x86_64                 15.4-1PGDG.rhel7        pgdg15
    postgresql15-libs.x86_64                 15.4-1PGDG.rhel7        pgdg15
    postgresql15-llvmjit.x86_64              15.4-1PGDG.rhel7        pgdg15
    postgresql15-odbc.x86_64                 16.00.0000-1PGDG.rhel7  pgdg15
    postgresql15-plperl.x86_64               15.4-1PGDG.rhel7        pgdg15
    postgresql15-plpython3.x86_64            15.4-1PGDG.rhel7        pgdg15
    postgresql15-pltcl.x86_64                15.4-1PGDG.rhel7        pgdg15
    postgresql15-server.x86_64               15.4-1PGDG.rhel7        pgdg15
    postgresql15-tcl.x86_64                  3.0.0-1.rhel7           pgdg15
    postgresql15-test.x86_64                 15.4-1PGDG.rhel7        pgdg15
    postgresql_anonymizer11.noarch           0.3.1-1.rhel7           pgdg11
    postgresql_anonymizer11.x86_64           0.7.1-1.rhel7           pgdg11
    postgresql_anonymizer12.noarch           0.3.1-1.rhel7.1         pgdg12
    postgresql_anonymizer12.x86_64           0.7.1-1.rhel7           pgdg12
    postgresql_anonymizer13.x86_64           0.7.1-1.rhel7           pgdg13
    postgresql_anonymizer_11.x86_64          1.1.0-5PGDG.rhel7       pgdg11
    postgresql_anonymizer_11-llvmjit.x86_64  1.1.0-5PGDG.rhel7       pgdg11
    postgresql_anonymizer_12.x86_64          1.1.0-5PGDG.rhel7       pgdg12
    postgresql_anonymizer_12-llvmjit.x86_64  1.1.0-5PGDG.rhel7       pgdg12
    postgresql_anonymizer_13.x86_64          1.1.0-5PGDG.rhel7       pgdg13
    postgresql_anonymizer_13-llvmjit.x86_64  1.1.0-5PGDG.rhel7       pgdg13
    postgresql_anonymizer_14.x86_64          1.1.0-5PGDG.rhel7       pgdg14
    postgresql_anonymizer_14-llvmjit.x86_64  1.1.0-5PGDG.rhel7       pgdg14
    postgresql_anonymizer_15.x86_64          1.1.0-5PGDG.rhel7       pgdg15
    postgresql_anonymizer_15-llvmjit.x86_64  1.1.0-5PGDG.rhel7       pgdg15
    postgresql_autodoc.noarch                1.41.1-1.rhel7.1        pgdg-common
    postgresql_faker_11.noarch               0.4.0-1.rhel7           pgdg11
    postgresql_faker_11.x86_64               0.5.3-1.rhel7           pgdg11
    postgresql_faker_12.noarch               0.4.0-1.rhel7           pgdg12
    postgresql_faker_12.x86_64               0.5.3-1.rhel7           pgdg12
    postgresql_faker_13.noarch               0.4.0-1.rhel7           pgdg13
    postgresql_faker_13.x86_64               0.5.3-1.rhel7           pgdg13
    postgresql_faker_14.noarch               0.4.0-1.rhel7           pgdg14
    postgresql_faker_14.x86_64               0.5.3-1.rhel7           pgdg14
    postgresql_faker_15.x86_64               0.5.3-1.rhel7           pgdg15
    postgresqltuner.noarch                   1.0.1-4.el7             epel
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  6. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    On test server you have with failed PostgreSQL install and YUM repo in place, what output do you get if you try this command
    Code (Text):
    yum -y swap -- remove postgresql-libs -- install libpq5
    

    If that successfully swaps YUM packages, then retry centmin.sh menu option 5 recompile of PHP

    but then you need to create a test Nginx vhost and double check pure-ftpd FTP virtual user can still log into pure-ftpd after switching it's postgresql-libs dependency
     
  7. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    Code:
    yum -y swap -- remove postgresql-libs -- install libpq5
    Loaded plugins: fastestmirror, priorities, versionlock
    Loading mirror speeds from cached hostfile
     * base: forksystems.mm.fcix.net
     * centos-sclo-rh: mirror.ash.fastserv.com
     * centos-sclo-sclo: forksystems.mm.fcix.net
     * epel: forksystems.mm.fcix.net
     * extras: mirrors.advancedhosters.com
     * updates: nyc.mirrors.clouvider.net
    279 packages excluded due to repository priority protections
    Resolving Dependencies
    --> Running transaction check
    ---> Package libpq5.x86_64 0:15.4-42PGDG.rhel7 will be installed
    ---> Package postgresql-libs.x86_64 0:9.2.24-8.el7_9 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================================================================================================
     Package                                  Arch                            Version                                    Repository                            Size
    ================================================================================================================================================================
    Installing:
     libpq5                                   x86_64                          15.4-42PGDG.rhel7                          pgdg-common                          466 k
    Removing:
     postgresql-libs                          x86_64                          9.2.24-8.el7_9                             @updates                             667 k
    
    Transaction Summary
    ================================================================================================================================================================
    Install  1 Package
    Remove   1 Package
    
    Total size: 466 k
    Downloading packages:
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Installing : libpq5-15.4-42PGDG.rhel7.x86_64                                                                                                              1/2
      Erasing    : postgresql-libs-9.2.24-8.el7_9.x86_64                                                                                                        2/2
      Verifying  : libpq5-15.4-42PGDG.rhel7.x86_64                                                                                                              1/2
      Verifying  : postgresql-libs-9.2.24-8.el7_9.x86_64                                                                                                        2/2
    
    Removed:
      postgresql-libs.x86_64 0:9.2.24-8.el7_9
    
    Installed:
      libpq5.x86_64 0:15.4-42PGDG.rhel7
    
    Complete!
    
    I then ran centmin.sh menu option 5 recompile of PHP again and it seemed to work.

    I have no idea what this means though:
    I'm testing a listmonk install. So far I've:
    1. Created a snapshot of my current server (just a forum.myforum.com), then created a new cloud server with that snapshot.
    2. Installed PostgreSQL per https://community.centminmod.com/threads/24124/
    3. Installed Docker per https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7
    4. Created a "test1.mysite.com" subdomain pointed to the new IP/server. Haven't bothered trying to get a 2nd version of the forum running.
    5. Created a new vhost for the test site. https://centminmod.com/nginx_domain_dns_setup.html
    Then plan to:
    1. Install listmonk into "/home/nginx/domains/test1.mysite.com/public".
    I'm connecting to the test server the same way as my live site: sftp via Filezilla, SSH via Putty.
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Thanks for the confirmation that it works, the next time you get a yum update run with PostgreSQL or pure-ftpd related YUM packages, update us on how it goes - just wondering what swapping the conflicting YUM packages via yum swap command would do for that.
     
  9. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    I have yum updates on auto, and I think they come fairly infrequently? I don't expect to have this test server running for long. I did a search for "pure-ftpd" but I don't quite understand what you're asking.
     
  10. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    Hmm, postgres still doesn't seem to be installed. I even updated PHP to 8.1.25, and when I type "psql" it says command not found.

    I came across this https://phoenixnap.com/kb/check-postgresql-version which says to use
    Code:
    locate bin/postgres
    and
    locate bin/psql
    
    Which didn't work. But "locate postgres" and "locate psql" gives:
    Code:
    locate postgres
    /etc/selinux/targeted/active/modules/100/postgresql
    /etc/selinux/targeted/active/modules/100/postgresql/cil
    /etc/selinux/targeted/active/modules/100/postgresql/hll
    /etc/selinux/targeted/active/modules/100/postgresql/lang_ext
    /svr-setup/srcache-nginx-module-0.32/t/postgres-main.t
    /svr-setup/srcache-nginx-module-0.33/t/postgres-main.t
    /usr/lib64/security/pam_postgresok.so
    /usr/local/src/centminmod/inc/postgresql.inc
    /usr/share/doc/postgresql-libs-9.2.24
    /usr/share/doc/pam-1.1.8/txts/README.pam_postgresok
    /usr/share/man/man8/pam_postgresok.8.gz
    /var/cache/yum/x86_64/7/pgdg11/b7d0e8818c335fe56713a8c5569b7c43af195739ccbeb25405acf9cf973ef37d-postgresqldbserver-11.xml.gz
    /var/cache/yum/x86_64/7/pgdg12/321321fb85e82fa8974da1255ae28b1c1355e4c9697ac8cfa2b64c5f93c711eb-postgresqldbserver-12.xml.gz
    /var/cache/yum/x86_64/7/pgdg13/9b9df69cb6e6eb97dffbb248596e90b4d415da0569879e5d8c643672bc562138-postgresqldbserver-13.xml.gz
    /var/cache/yum/x86_64/7/pgdg14/6c32cff72637f085c0ce426466d582579625ef144cdd18d535142630bbf2615d-postgresqldbserver-14.xml.gz
    /var/cache/yum/x86_64/7/pgdg15/caeba20573eaf5d976c0790e74317d3a53124aaaaaab44692ce01b2d1c618ac7-postgresqldbserver-15.xml.gz
    
    locate psql
    /usr/share/bash-completion/completions/psql
    
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    What's output from these commands
    Code (Text):
    yum -q list postgresql* | tr -s ' ' | column -t
    

    Actually just noticed for previous output you posted at https://community.centminmod.com/th...-postgresql-via-php-upgrade.24193/#post-97526 there is not PostgreSQL 16 only 15 referenced. Might need to update my routine for PostgreSQL 15 instead of 16 or check why v16 isn't available

    edit: Looks like PostgreSQL 16 is only available for EL8 and EL9 OSes https://download.postgresql.org/pub/repos/yum/16/redhat/, so not available for EL7 based CentOS 7. Explains why my EL8/EL9 testing worked. So will need to find the latest version of PostgreSQL available to CentOS 7 which seems to be PostgreSQL 15 https://download.postgresql.org/pub/repos/yum/15/redhat/
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    FYI, just updated 130.00beta01 with fix for CentOS 7 and max PostgreSQL 15 version, running cmupdate first to sync your local server's updated Centmin Mod code and then try again centmin.sh menu option 5.
     
  13. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    Thank you! So this command is no longer needed right?
    Code:
    yum -y swap -- remove postgresql-libs -- install libpq5
    Do I need to reverse that?
    Code:
    yum -y swap -- remove libpq5 -- install postgresql-libs
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only needed to run that one time

    I forgot to add that command to the actual update though LOL, so you should be fine as you ran the command already
     
  15. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    I'm writing a short guide for setting up listmonk so I want to make sure I understand correctly. You're going to add that command to the internal workings so that people who want to use postgres don't need to manually input it like I did? So in the future we'll only need to do "POSTGRESQL='y'" in config file at /etc/centminmod/custom_config.inc then centmin.sh menu option 5 update/recompile?

    EDIT:
    is this a problem? typo?
    Code:
    cmupdate
    No local changes to save
    Updating be96b4f..6d3a369
    Fast-forward
     centmin-cli.sh          |  2 +-
     centmin.sh              |  2 +-
     inc/nginx_configure.inc | 16 ++++++++++++++++
     inc/php_configure.inc   | 53 +++++++++++++++++++++++++++++++++++++++++------------
     inc/php_upgrade.inc     |  2 +-
     inc/postgresql.inc      | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
     installer82-gitlab.sh   |  2 +-
     installer82.sh          |  2 +-
     8 files changed, 146 insertions(+), 21 deletions(-)
    No local changes to save
    Already up-to-date.
    [08:37][root@centos7test ~]# centmin
    /usr/local/src/centminmod ~
    /usr/local/src/centminmod/inc/postgresql.inc: line 241: syntax error near unexpected token `;'
    /usr/local/src/centminmod/inc/postgresql.inc: line 241: `    if [[ ! -f /usr/pgsql-15/bin/pg_config || ! -f /usr/pgsql-15/lib/libpq.a || ! -f /etc/yum.repos.d/pgdg-15-redhat.repo ]] || ; then'
    
    I removed the " || " before the ;
    There's another one:
    Code:
    centmin
    /usr/local/src/centminmod ~
    /usr/local/src/centminmod/inc/postgresql.inc: line 321: syntax error near unexpected token `;'
    /usr/local/src/centminmod/inc/postgresql.inc: line 321: `    if [[ ! -f /usr/pgsql-16/bin/pg_config || ! -f /usr/pgsql-16/lib/libpq.a || ! -f /etc/yum.repos.d/pgdg-16-redhat.repo ]] || ; then'
    
     
    Last edited: Oct 27, 2023
  16. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  17. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    I was thinking this might be normal, but maybe it's not?
    Code:
    psql
    psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
            Is the server running locally and accepting connections on that socket?
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    need the last php upgrade log
     
  19. MaximilianKohler

    MaximilianKohler Member

    196
    5
    18
    Jun 23, 2023
    Ratings:
    +28
    Local Time:
    8:35 PM
    I think you have the directions on how to do that listed after a php upgrade ends/fails. It would be useful if it was added in the pre-filled text here too: https://community.centminmod.com/forums/install-upgrades-or-pre-install-questions.8/create-thread

    I did a search and can't find the thread: https://community.centminmod.com/search/11524266/?q=php+log&o=date&c[title_only]=1

    I found the "/root/centminlogs/" path in my previous log. I'm not sure this is the right log though. It looks like there's a "php_upgrade.log" and "php_upgrade_minimal.log". Neither of which seems to match the previous log I shared. The "php_upgrade.log" is 3 MB and too big for pastebin (512 kilobytes per Paste), so here's the most recent "minimal" log (300kb): https://pastebin.com/1wfWLV15

    For some reason, these two recent ones I looked at had exposed passwords in them, whereas my first log did not.

    I see an error in the log:
    Code:
    /usr/local/src/centminmod/inc/postgresql.inc: line 307: /usr/pgsql-16/bin/postgresql-15-setup: No such file or directory
    Job for postgresql-15.service failed because the control process exited with error code. See "systemctl status postgresql-15.service" and "journalctl -xe" for details.
    ● postgresql-15.service - PostgreSQL 15 database server
       Loaded: loaded (/usr/lib/systemd/system/postgresql-15.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Fri 2023-10-27 21:09:35 UTC; 9ms ago
         Docs: https://www.postgresql.org/docs/15/static/
      Process: 22837 ExecStartPre=/usr/pgsql-15/bin/postgresql-15-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
     
    Last edited: Oct 29, 2023
  20. eva2000

    eva2000 Administrator Staff Member

    54,087
    12,177
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,735
    Local Time:
    2:35 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yes that would be useful. They're sticky threads in https://community.centminmod.com/forums/install-upgrades-or-pre-install-questions.8/

    For PHP upgrade log https://community.centminmod.com/threads/how-to-troubleshoot-php-installs-upgrades.17857/