无法连接到服务器:没有这样的文件或目录服务器是否在本地运行并接受Unix域套接字"/var/run/postgresql/.s.PGSQL.5432"上的连接?
我卸载并安装了postgresql,但对我来说没什么用.
$ sudo service postgresql start
* Starting PostgreSQL 10 database server
* Failed to issue method call: Unit postgresql@10-main.service failed to load: No such file or directory. See system logs and 'systemctl status postgresql@10-main.service' for details.
systemctl status postgresql
Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/systemd1/unit/postgresql_2eservice
$ psql -V
psql (PostgreSQL) 10.4 (Ubuntu 10.4-2.pgdg14.04+1)
Run Code Online (Sandbox Code Playgroud) postgresql ×1