Symptoms
If you try to install PostgreSQL on your Ubuntu server you get an error when running the following command:
V98:
/usr/local/cpanel/scripts/installpostgres
E: Unable to locate package postgresql-devel
E: Unable to locate package postgresql-libs
E: Unable to locate package postgresql-server
info [installpostgres] Completed apt execution “-yf -o Dpkg::Options='--force-confdef' -o Dpkg::Options='--force-confold' install postgresql postgresql-devel postgresql-libs postgresql-server”: in 0.630 second(s).
Use of uninitialized value $pg_data in concatenation (.) or string at /scripts/installpostgres line 148, <STDIN> line 1.
Use of uninitialized value $out in scalar chomp at /scripts/installpostgres line 75, <STDIN> line 1.
info [installpostgres] Updating postgresql configuration now...
Failed to determine postgresql data directory
info [installpostgres] Attempting to restart postgresql...
The PostgreSQL installation failed!
V100:
/usr/local/cpanel/scripts/installpostgres
cPanel does not support PostgreSQL on this system at this time! at /usr/local/cpanel/scripts/installpostgres line 83.
Workaround
Unfortunately, PostgreSQL is not currently supported on Ubuntu OS.
If you wish to use PostgreSQL, please choose a different Operating system.
The supported operating system can be found here:
What operating systems are supported by cPanel?
This article will be updated once PostgreSQL will be supported in Ubuntu OS.