On Tuesday, December 1, 2020, Atul Kumar <akumar14...@gmail.com> wrote: > > There is no directory of postgresql in /var/run.
Wasn’t expecting there to be, that’s what you get the error. > Please help me out. > Since “su - postgres” works for psql just do that for createuser. Or do what Tom said and specify -h /tmp in your commands It might be interesting to see what “which psql” shows in each case; or whether psql works in the sudo -u case. David J.