I am trying to install postgresql-9.5 or postgresql-9.6 on my ubuntu 16.04
or 14.04
machine, after following the installation process using below commands.
sudo apt-get install update
sudo apt-get install postgresql postgresql-contrib
But when I am trying to open psql
from my terminal using below commands
sudo su postgres
psql
every time its just showing.
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 have tried approximately 10 stackoverflow.com solutions but no success. Please help me out before I tear all my hairs :(
$ service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
Active: active (**exited) since রবি 2017-03-12 21:45:56 BDT; 23min ago
Process: 917 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 917 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
CGroup: /system.slice/postgresql.service
see this line carefully why exited ? Active: active (exited) since রবি 2017-03-12 21:45:56 BDT; 23min ago
active (exited)
is normal – Gab