Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Postgresql Failed despite following documentation

Discussion in 'Database Discussion' started by Edmund Ong, Sep 4, 2016.

  1. Edmund Ong

    Edmund Ong Registered

    Sep 2, 2016
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi There,

    I had similar errors as the other who had posted earlier on, however after dumping it all, it still didn't work after re installing using the following command: /scripts/installpostgres.

    I have also followed the documentation method:

    Install or Update PostgreSQL on Your cPanel Server - cPanel Knowledge Base - cPanel Documentation

    [root@cpanel ~]# /scripts/installpostgres
    This script installs PostgreSQL 9.2.x or later.
    If your system runs an older version of PostgreSQL, you must
    dump your databases to a file, and then restore them after
    PostgreSQL 9.2.x is NOT backwards compatible.
    If no PostgreSQL databases exist on your system, run the
    following command to force the creation of a PostgreSQL 9.2.x -style
       mv /var/lib/pgsql /var/lib/pgsql.old
       systemctl restart postgresql
    Do not run this command if databases exist that you wish to keep!
    Are you certain that you wish to proceed? [y/(n)]:y
    Loaded plugins: fastestmirror, langpacks, tsflags, universal-hooks
    Loading mirror speeds from cached hostfile
    * EA4:
    * base:
    * extras:
    * updates:
    No package rh-postgresql available.
    No package rh-postgresql-devel available.
    No package rh-postgresql-libs available.
    No package rh-postgresql-server available.
    Package postgresql-9.2.15-1.el7_2.x86_64 already installed and latest version
    Package postgresql-devel-9.2.15-1.el7_2.x86_64 already installed and latest version
    Package postgresql-libs-9.2.15-1.el7_2.x86_64 already installed and latest version
    Package postgresql-server-9.2.15-1.el7_2.x86_64 already installed and latest version
    Nothing to do
    Failed to determine postgresql data directory
    The PostgreSQL installation failed.
    Building global cache for cpanel...Done
    Yet, in the above log it still states that it fails to determine the postgresql data directory, despite using the given script to install postgresql.

    Hope to seek your help.
    #1 Edmund Ong, Sep 4, 2016
    Last edited by a moderator: Sep 4, 2016
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Could you let us know the output from the "systemctl status postgresql.service" command on this system?

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice