0
votes

I found some other Stack Overflow threads on this, but, after trying a lot of solutions, couldn't fix the problem. Upon running the command psql -U postgres, I got the following error message.

psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"

Running the command pg_lsclusters gave me this output:

12  main    5433 down   <unknown> /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log

Any thoughts?

1

1 Answers

0
votes

If everything has been correctly installed and setup the following command should work:

sudo pg_ctlcluster 12 main start