postgresql无法创建用户

时间:2015-12-13 02:41:23

标签: postgresql

我使用以下命令安装了Postgresql:

sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.3 libpq-dev

由于postgresql安装没有设置用户,我手动尝试创建它。但是,我得到了这个奇怪的错误。

➜  ~  sudo -u postgres createuser cooldudeabhi -s
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"?

0 个答案:

没有答案