postgresql:没有这样的文件或目录

时间:2014-11-03 10:44:32

标签: postgresql deployment

我尝试使用this guide在我的VPS服务器上安装postgresql数据库。

在那里说

sudo apt-get install postgresql postgresql-contrib libpq-dev

然后

sudo su - postgres
createuser --pwprompt
exit

当我运行createuser --pwprompt时,它会要求我创建一个密码,一旦我填写它,我会收到以下错误:

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 "/var/run/postgresql/.s.PGSQL.5432"?

如果我psql --version,我会psql (PostgreSQL) 9.4beta3

which psql输出/usr/bin/psql

有关如何解决此问题的想法吗?

更新

正在运行pg_ctl会出现另一个错误

WARNING:root:could not open file '/etc/apt/sources.list.d/passenger.list'

The program 'pg_ctl' is currently not installed. To run 'pg_ctl' please ask your administrator to install the package 'postgres-xc'

Althgough阅读postgres-xc显示了很多其他问题。

0 个答案:

没有答案