1

I'm using CentOS 7 with EPEL Repo and installed Postgresql 9.6 which is a need for a webshop application. Now some propel installation script wants to execute pg_ctlcluster. The Installation ends with an error:

Exception: sudo: pg_ctlcluster: command not found

I checked /usr/pgsql-9.6/bin, there is only pg_ctl, but no pg_ctlcluster. Some said pg_ctl and pg_ctlcluster are not exactly the same. It looks like pg_ctlcluster is a Ubuntu thing. It's used for Postgres Cluster (...).

Do you have any ideas what's the best way to replace pg_ctlcluster?

Just copy/symlink pg_ctlcluster -> pg_ctl sounds not like it should be. Maybe someone have a suiteable RPM.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
vine
  • 147
  • 2
  • 13
  • Do you have any updates about this one? – Goon Nguyen Jul 30 '19 at 15:14
  • @GoonNguyen I never checked. I tried to install Spryker Webshop Software which requires Postgres. I opened an incident there: discuss.spryker.com/t/centos-installation-no-vm-failed-no-pg-ctlcluster-available/331 – vine Jul 31 '19 at 17:58

2 Answers2

0

pg_ctlcluster is not part of core PostgreSQL, but the PGDG Debian install packages come with an additional utility command of that name.

So that propel installation script is written for Debian or Ubuntu Linux.

You'd best ask the provider of the script for a script that supports the Redhat-based Linux distrubutions.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
0

I didnt want to overwork the whole PHP installation script, so this fix worked for me:

- $process = $this->getProcess(sprintf('sudo pg_ctlcluster %s main restart --force', $postgresVersion));
+ $process = $this->getProcess(sprintf('sudo -i -u postgres /usr/pgsql-9.6/bin/pg_ctl %s restart', NULL));
+ $process = $this->getProcess(sprintf('exit', NULL));

Not for use in productional enviroments

vine
  • 147
  • 2
  • 13