Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在Ubuntu上启动Postgresql_Postgresql - Fatal编程技术网

无法在Ubuntu上启动Postgresql

无法在Ubuntu上启动Postgresql,postgresql,Postgresql,我在WSL上使用Ubuntu。 我一直在尝试启动postresql服务器,但无法启动 当我尝试使用启动服务时 服务postgresql启动,它给了我 11/主(端口5432):向下 除此之外,即使运行psql命令,我也会: psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Un

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

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

11/主(端口5432):向下

除此之外,即使运行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"?
有人能帮我吗?我看了十几个这样的问题,结果都是同样的错误。

试试:

sudo apt-get update 

sudo apt-get install postgresql postgresql-contrib