After experiencing issues related to the existence of two different PostgreSQL versions installed on the same machine, I decided to remove --purge postgresql*
and reinstall postgresql-13. Now the output of psql --version
is psql (PostgreSQL) 13.4 (Ubuntu 13.4-1)
.
However, trying to enter psql, I have this error:
psql: error: could not connect to server: Aucun fichier ou dossier de ce type
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I tried the several solutions proposed on similar posts but none solved my issue.
Edit : output of pg_lsclusters
is
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down,binaries_missing postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
13 main 5433 online postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log