Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target

From: Marco Ippolito <ippolito(dot)marco(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target
Date: 2019-09-18 09:50:45
Message-ID: CAFegzBQ2LxM9SAV17dFpEMF+wgZzOXk80HkAPJhvz+DtFY+9Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition using package
manager: sudo apt-get install postgresql-11. But now I'm not able to call
psql:

(base) marco(at)pc:~$ sudo su -l postgres
[sudo] password for marco:
No directory, logging in with HOME=/
postgres(at)pc:/$ psql
Warning: No existing local cluster is suitable as a default target.
Please
see man pg_wrapper(1) how to specify one.
Error: You must install at least one postgresql-client-<version> package
postgres(at)pc:/$

I tried to specify the port to use but it asks for a postgresql-client:

(base) marco(at)pc:~$ sudo -u postgres /usr/bin/psql -p 5432
Error: You must install at least one postgresql-client-<version> package

But the latest postgresql-client is already installed:

(base) marco(at)pc:~$ sudo apt-get install postgresql-client-11
Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-client-11 is already the newest version (11.5-1.pgdg18.04+1).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

How to solve the problem? Looking forward to your kind help.
Marco

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2019-09-18 10:03:36 Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target
Previous Message Luca Ferrari 2019-09-18 08:36:31 Re: install pgcrypto module to existing postgreSQL