【发布时间】:2013-03-13 13:45:28
【问题描述】:
我在 ubuntu 12.04 服务器上,我正在尝试安装 postgresql。截至目前,我已成功安装它,但无法配置它。我需要创建一个角色才能继续前进,我在终端中运行了这个命令:
root@hostname: createuser -s -r postgres
它说:
createuser: could not connect to database postgres: FATAL: role "root" does not exist
很好,我做到了:
su - postgres
然后又试了一次
postgres@hostname: createuser -s -r postgres
我得到了错误
createuser: could not connect to database postgres: FATAL: role "postgres" does not exist
当我这样做时,我得到了同样的错误
psql -d dbname
它就像一个循环,我无法创建角色 postgres,因为角色 postgres 尚不存在。
我该如何解决这个问题?
postgres版本好像是9.1.x,ubuntu版本好像是12.10
【问题讨论】:
-
sudo pg_lsclusters的输出是什么? -
@A.H.找不到命令
pg_lsclusters。它要求我安装postgresql-common包。我尝试以 root 用户身份进行操作,但出现错误。它尝试删除postgres-xc和dpkg: error processing postgres-xc (--remove):然后退出。
标签: postgresql ubuntu installation role