I installed postgresql on archlinux using this command:
sudo pacman -S postgresql
And it installed OK. But when I want to create a new user, like this:
sudo -iu postgres
[postgres@amirashabani ~]$ createuser amirashabani
I receive this error:
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?
How can I fix this?