I installed postgreSQL using this tutorial, but it can't connect to server. I use this command to login to Postgres session:
sudo -u postgres psql
But I get this error:
psql: 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.5432"?
I searched in Stackoverflow and found an answer that says I have to remove postmaster.bid file using this command:
rm /usr/local/var/postgres/postmaster.pid
But it causes an error too:
rm: cannot remove '/usr/local/var/postgres/postmaster.pid': No such file or directory
These are the local directory's contents:
bin etc games include lib man n sbin share src
So, how can I find the postmaster.bid file and remove it? (If it's the solution)
My OS is Ubuntu 16.04 .