sudo -u postgres psql -c "SELECT version();" perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = "zh_CN.UTF_8", LC_CTYPE = "UTF-8", LC_TERMINAL = "iTerm2", LC_TERMINAL_VERSION = "3.4.8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). /bin/bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF_8) 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"?