无法在Ubuntu

时间:2019-04-30 08:29:03

标签: postgresql

我在WSL上使用Ubuntu。 我一直在尝试启动一个postresql服务器,但不能。

当我尝试使用来启动服务时 service postgresql start,它给了我

11/main (port 5432): down

最重要的是,即使运行psql命令也能给我:

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"?

有人可以帮我吗?我看了十几个SO问题,最终以相同的错误结束。

1 个答案:

答案 0 :(得分:0)

尝试:

sudo apt-get update 

sudo apt-get install postgresql postgresql-contrib