linux - postgres ubuntu 无法连接到 5432 端口
问题描述
好吧,我尝试了几个小时在 ubuntu 中安装和配置 postgres,但出现以下错误:
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"?
我已经尝试了几乎所有找到的解决方案,但仍然没有成功。
以下是我用来安装 postgres 的命令:
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo -i -u postgres
psql (After this I got an error)
在安装 postgres 期间出现错误。请通过我提供建议或资源,我可以解决这个问题!
解决方案
推荐阅读
- twilio - twilio 中不提供 WhatsApp 的交互式消息模板
- mongodb - MondoDB 聚合 - 重新映射内部文档
- angular - angular 6 用条件覆盖 css
- android - 了解 Android 中的 PHY_LE_1M 与 PHY_LE_1M_MASK
- android - Flutter中有执行顺序吗?
- android - java.lang.IllegalStateException ConstraintLayout 没有为片段设置 NavController
- javascript - 在没有排序功能的情况下对数组进行排序并删除重复项
- linux - Linux:写入 i2c/SMBus
- elasticsearch - 用于获取字段中具有空值的记录的 Elasticsearch 查询
- javascript - JavaScript 中的 JSON.parse(this.response) 字符串问题