-1

I am trying to install Postgres Enterprise manager in my Linux distro Ubuntu for my Windows machine by following this tutorial on their official website.

Postgres Enterprise Manger requires two different Postgres to function, first the server it will monitor which can either be the normal Postgres, or the EDB advanced server and second a backend databse which can either still be postgres or EDB advancer server instance where it will store the monitored data. I installed PostgreSQL for this purpose. When I try to configure the PEM server using this command sudo /usr/edb/pem/bin/configure-pem-server.sh I keep getting this error despite inputting the path to my postgres

sudo /usr/edb/pem/bin/configure-pem-server.sh
[sudo] password for chidera:

 -----------------------------------------------------
 EDB Postgres Enterprise Manager
 -----------------------------------------------------
Install type: 1:Web Services and Database, 2:Web Services 3: Database [ ] :1
-->  [Info] -->  [Info] Check apache2 utility commands.
-->  [Info] -->  [Info] Configure apache2 modules - ssl and gnutls.
Enter local database server installation path (i.e. /usr/edb/as12 , or /usr/pgsql-12, etc.) [ ] :/var/lib/postgresql/15/main
-->  [Error]
-->  [Error] -----------------------------------------------------
-->  [Error] CRITICAL ERROR
-->  [Error] -----------------------------------------------------
-->  [Error] -->  [Error] Script exiting because of the following error:
-->  [Error]
Either database server installation path is incorrect or the required psql binary is not installed.
If the psql binary is not installed, then install any one of the following packages:
edb-as<X>-server-client
postgresql<X>
Where, X is version 12 or above.
-->  [Error] Current working directory and stack is:
 0  /home/chidera
1596 HandleCommandLineArguments /usr/edb/pem/bin/configure-pem-server.sh
1723 InstallPEMServer /usr/edb/pem/bin/configure-pem-server.sh
1935 main /usr/edb/pem/bin/configure-pem-server.sh
-->  [Error] -->  [Error] Current working directory and stack is:

I have been on this error for days and will appreciate any help I can get.

3 Answers3

0

If the psql binary is not installed, then install any one of the following packages: edb-as-server-client postgresql Where, X is version 12 or above.

Firstly, you should consider the suggestion above to install version 12 or above for both PostgreSQL itself and EDB. Without a version greater or equal to 12, it won't work.

Hence, the path should be like so:

/usr/edb/as12

or

/usr/pgsql-12
Tito
  • 289
  • 8
  • I installed PostgreSQL version 15 and EDB advanced server, same version 15. That path is the actual path to the bin PSQL Binary, when I run this command below, ```psql --version psql (EnterpriseDB) 15.3.0 (Ubuntu 15.3.0-1.jammy) $ which psql /usr/bin/psql``` it clearly shows that PSQL is installed. – Chidera Stella Onumajuru Jul 30 '23 at 08:37
  • You should `cd` into the postgres installation path that has the binary files or add `psql` to **PATH** and install from there. It shows that your cwd is `/home/chidera`, that's where the error is coming from. The steps for installation now should be `export PATH=/path/to/postgresql/15/bin:$PATH` and `sudo /usr/edb/pem/bin/configure-pem-server.sh` – Tito Jul 30 '23 at 19:57
0

The issue seems to be related to the directory you are providing for this installation. /var/lib/postgresql/15/main is the data directory and not the directory for the Postgresql installation.

The installation directory is where binaries like the psql is stored. Typically these are stored in /usr/bin. Try confirming this by running:

which psql

This should output the path to the psql binary usually /usr/bin/psql.

Try running the configuration again, but this time when prompted for the path, enter: /usr, such as:

Enter local database server installation path (i.e. /usr/edb/as12 , or /usr/pgsql-12, etc.) [ ] : /usr

Safi50
  • 379
  • 1
  • 7
0

As per my understanding, the problem is related to using the wrong directory for PostgreSQL installation. The provided path seems to be for data storage, not program installation. The correct installation directory typically contains essential files like 'psql' and is usually /usr/bin. To fix this, during configuration, input the correct installation path, such as /usr, instead of the data directory path. This will resolve the issue.

I hope this would sort out the issue.