0
votes

I am running Ubunutu 14.04. I recently purged postgresql from my system and have re-installed it. The installation seemed successful and the postgres user was created successfully, however, when I attempt to launch psql I get the following 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"?

Any advice?

Thank you

2
Hi @fvu ps ax | grep gives: 10831 pts/0 S 0:00 su postgres 11786 pts/0 S+ 0:00 grep postgres - redfixie
... which means that your postgres service isn't running. As a test, start it manually (something like sudo service postgresql start), if that works, check your manual to see how to autostart a service on each boot. - fvu
No that's still not working. - redfixie
do you see a postgres process running in px ax now? - fvu
Doesnt't look like it 3152 pts/2 S 0:00 su postgres 3177 pts/2 S+ 0:00 grep postgres - redfixie

2 Answers

0
votes

I removed postgresql 9.4 again and replaced it with the previous version. Everything appears to be working now, though this is a somewhat unsatisfactory solution.

0
votes

Did you reinstall the postgresql-9.6.x ?

Me too...

You need to uninstall postgresql completely

sudo apt --purge autoremove postgresql*

sudo apt install postgresql-9.6

ubuntu16.04