日期2026 年 5 月 11 日一、安装环境与软件版本操作系统Windows Server 2012 R2数据库版本postgresql-18.3-2-windows-x64安装包大小354 MB371,789,096 字节自带工具pgAdmin 4版本 9.12二、安装问题现象安装流程正常执行但最后一步报错Problem running post-install step. Installation may not complete correctly....进入系统服务查看无 PostgreSQL 服务项需手动执行initdb.exe初始化数据库。双击initdb.exe时提示缺少依赖动态库典型文件如下api-ms-win-crt-stdio-l1-1-0.dllapi-ms-win-crt-conio-l1-1-0.dllapi-ms-win-crt-convert-l1-1-0.dllapi-ms-win-crt-environment-l1-1-0.dllapi-ms-win-crt-filesystem-l1-1-0.dllapi-ms-win-crt-heap-l1-1-0.dllapi-ms-win-crt-locale-l1-1-0.dllapi-ms-win-crt-math-l1-1-0.dllapi-ms-win-crt-multibyte-l1-1-0.dllapi-ms-win-crt-private-l1-1-0.dllapi-ms-win-crt-process-l1-1-0.dllapi-ms-win-crt-runtime-l1-1-0.dllapi-ms-win-crt-string-l1-1-0.dllapi-ms-win-crt-time-l1-1-0.dllapi-ms-win-crt-utility-l1-1-0.dll三、问题根源上述缺失文件属于Windows 通用 C 运行时库UCRT是 Windows 10 及以上系统内置组件。Windows Server 2012 R2 及更低版本系统默认未预装仅安装 VC 2015 运行库无法解决。四、解决方案安装 UCRT 补丁需安装微软官方补丁KB2999226Windows 通用 C 运行时更新。1. 正确下载地址https://www.microsoft.com/zh-cn/download/details.aspx?id482342. 正确安装包Windows Server 2012 R2 请选择Windows8.1-KB2999226-x64.msu3. 常见踩坑提醒网上多数教程提供的补丁地址不兼容 Windows Server 2012 R2会直接导致安装失败务必使用上述官方地址与对应版本。五、pgAdmin 4 兼容问题PostgreSQL 18.3 自带的pgAdmin 4 v9.12 无法在 Windows Server 2012 R2 运行启动提示无法运行于此电脑上解决方法卸载当前版本 pgAdmin 4安装支持 Windows 2012 的最终版本pgAdmin 4 v6.21下载地址https://www.postgresql.org/ftp/pgadmin/pgadmin4/v6.21/windows/说明如需使用新版 pgAdmin 4只能在 Windows 10/11 等新系统中远程连接数据库。六、总结Windows Server 2012 R2 安装高版本 PostgreSQL必须先装 KB2999226UCRT只装 VC 运行库无法解决依赖缺失pgAdmin 4 需降级到 v6.21 才能在该系统正常使用