You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法通过Homebrew运行PostgreSQL@14的问题求助

MacBook Ventura 13.2.1下PostgreSQL@14启动失败(Error 256/512)

在Ventura 13.2.1系统的MacBook上安装并运行postgresql@14时,服务始终处于error 256或512状态,尝试过相关解决方案但均未成功,以下是详细信息:

服务状态查询

➜  ~ brew services list

Name              Status     User   File

mongodb-community started    adrien ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
postgresql@14     error  512 root   ~/Library/LaunchAgents/homebrew.mxcl.postgresql@14.plist
unbound           none

PostgreSQL日志内容

postgres: 无法访问服务器配置文件 "/opt/homebrew/var/postgresql@14/postgresql.conf": 没有那个文件或目录
禁止以"root"用户身份运行PostgreSQL服务器。
必须使用非特权用户ID启动服务器,以避免可能的系统安全风险。有关如何正确启动服务器的更多信息,请参阅文档。

初始化数据库集群尝试及报错

➜  ~ initdb -D /var/lib/postgres/data/

该数据库系统的文件将归用户"adrien"所有。
该用户也必须拥有服务器进程。

数据库集群将使用区域设置"fr_FR.UTF-8"初始化。
默认数据库编码已相应设置为"UTF8"。
默认文本搜索配置将设置为"french"。

数据页校验和已禁用。

创建目录 /var/lib/postgres/data ... initdb: 错误: 无法创建目录 "/var/lib/postgres": 权限被拒绝

内容的提问来源于stack exchange,提问作者Adrien Chapelet

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.25 12:28:18