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

M2 Mac Pro 14上PgAdmin 4意外退出问题求助

pgAdmin 4 意外退出(EXC_BAD_ACCESS/SIGSEGV)在M2 Mac Pro 14上的解决方法

在M2 Mac Pro 14(macOS 13.2.1)环境下,通过Brew重装PostgreSQL、官网安装pgAdmin4后,pgAdmin4无法启动,持续弹出“pgAdmin has unexpectedly finished”错误。此前软件运行正常,卸载重装后出现该问题。

错误报告片段

Process:               pgAdmin 4 [2293]
Path:                  /Applications/pgAdmin 4.app/Contents/MacOS/pgAdmin 4
Identifier:            org.pgadmin.pgadmin4
Version:               7.5 (4280.88)
Code Type:             X86-64 (Translated)
Parent Process:        launchd [1]
Date/Time:             2023-08-23
OS Version:            macOS 13.2.1 (22D68)
Report Version:        12
Time Awake Since Boot: 5500 seconds
Time Since Wake:       370 seconds
System Integrity Protection: enabled
Crashed Thread:        0  CrBrowserMain  Dispatch queue: com.apple.main-thread
Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Codes:       0x0000000000000001, 0x0000000000000020
Termination Reason:    Namespace SIGNAL, Code 11 Segmentation  fault: 11
Terminating Process:   exc handler [2293]
VM Region Info: 0x20 is not in any region.  Bytes before following region: 140723125682144
REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
UNUSED SPACE AT START

已尝试的操作

  • 通过Brew卸载相关软件
  • 删除/Library目录下“pgAdmin”和“PostgreSQL 14”文件夹
  • 从Directory Utility移除“PostgreSQL 14”和“PostgreSQL Server”(因添加postgres用户时提示已存在,但未手动创建过该用户)
  • 通过官网.dmg文件重装PostgreSQL(遇密码问题,用终端卸载器再次卸载)
  • 使用brew install postgresql@14重装PostgreSQL并官网安装pgAdmin,问题仍存在

解决方案

1. 彻底清理pgAdmin4用户配置文件

残留的配置文件是常见崩溃诱因,执行以下命令删除相关目录:

rm -rf ~/.pgadmin/
rm -rf ~/Library/Application\ Support/pgAdmin/
rm -rf ~/Library/Caches/org.pgadmin.pgadmin4/
rm -rf ~/Library/Preferences/org.pgadmin.pgadmin4.plist

2. 修复Rosetta 2运行环境

pgAdmin4为X86-64架构,依赖Rosetta 2运行,重新安装Rosetta 2:

softwareupdate --install-rosetta --agree-to-license

3. 重置Launch Services数据库

Launch Services异常可能导致应用启动失败,重置后重启Mac:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

4. 尝试安装旧版本pgAdmin4

新版本可能与当前macOS存在兼容性问题,可下载官网旧版本安装包(如v7.0及更早版本)测试。

5. 验证PostgreSQL服务状态

确保PostgreSQL服务正常运行,避免pgAdmin因连接问题崩溃:

brew services list | grep postgresql@14
# 未启动则执行启动命令
brew services start postgresql@14

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 22:36:33