I'm following these instructions, however I can only get to step 17.2.
Despite installing postgresql successfully via the
sudo apt-get install postgresql
command, upon running
initdb -D /usr/local/pgsql/data
Ubuntu tells me that it 'initdb' isn't installed. The instructions tell me this command is installed by
sudo apt-get install postgresql
so what's going on? I can make initdb available by installing postgres-xc, but I think postgres-xc is just some weird third party rubbish, and it's not detailed in the instructions. Any ideas?
initdbis the underlying command but Debian and Ubuntu users should be using pg_createcluster and its related suite of commands. Furthermore you normally do not need toinitdbORpg_createclusterafterapt-get install postgresqlbecause the standard install already creates a default cluster, with a server and default/template databases, for you. The README Peter mentions above is worth your time to read. – cdaddr May 14 '14 at 07:52ls -l /usr/lib/postgresql/11/bin/returns:total 36 -rwxr-xr-x 1 root root 34888 Aug 13 23:56 pg_config*and runningpg_createcluster ...argsreturns:Error: no initdb program for version 11 foundSo the package appears to be broke. – David Nugent Jan 04 '21 at 22:21