当我在我的Windows笔记本电脑上安装Ubuntu 13.10时,我尝试激活postgres。 我去了终端,我运行了以下命令。
sudo apt-get install postgresql
sudo passwd postgres
Enter new UNIX password: 123123
Retype new UNIX password: 123123
sudo -u postgres createuser -P db_owner
Enter password for new role: 123123
Enter it again: 123123
Shall the new role be a superuser? (y/n) y
然后终端给了我以下错误:
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"?
请注意,这是一个新的安装Ubuntu 13.10,我还没有做任何事情,这是我第一次使用Ubuntu