I am trying to run postgres from terminal. What am I missing?
$psql
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
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"?
It looks like you’re on a system with
pg_wrapperlike Ubuntu or Debian, and your locale settings are messed up. This isn’t to do with PostgreSQL, it’s a system configuration problem. Perl is just complaining about it.Run
perlwithout arguments and you’ll see the same complaint.Assuming you’re on Ubuntu since you didn’t say otherwise, see: