我正在使用 postgresql 13。当我输入 psql 时,我得到了这个:
psql: error: could not connect to server: Ficheiro ou pasta inexistente
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
我安装它使用
sudo apt update
sudo apt install postgresql postgresql-contrib
systemctl status 给出了这个
postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2021-02-04 15:04:55 -03; 6min ago
Process: 35313 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 35313 (code=exited, status=0/SUCCESS)
fev 04 15:04:55 diego-I42IL1 systemd[1]: Starting PostgreSQL RDBMS...
fev 04 15:04:55 diego-I42IL1 systemd[1]: Finished PostgreSQL RDBMS.
好像没问题。