PostgreSQL安装异常:Problem running post-install step

1.错误详情

安装PostgreSQL时快要完成的时候抛出异常

Problem running post-install step. Installation may not complete correctlty.
The database cluster initialisation failed.

2.解决方法

以管理员权限打开PowerShell

找到PostgreSQL安装目录,进入bin文件夹(例子中是D:\PostgreSQL\bin 要换成自己的),按顺序执行以下代码(D:\pgdata 是安装时指定的数据库路径,要换成自己的)

初始化数据库

D:\PostgreSQL\bin>initdb.exe -D D:\pgdata

注册一个名为postgresql1122的服务

D:\PostgreSQL\bin>pg_ctl.exe register -N postgresql1122 -D D:\pgdata

win+R输入services.msc打开服务,找到刚刚注册的服务启动

 

启动服务后打开SQL Shell(psql),用系统当前的用户名登陆数据库

 

登录进去就能创建新的用户,比如postgres

 

参考:

(25条消息) PostgreSQL安装异常:Problem running post-install step。_x024的博客-CSDN博客

win10下安装postgresql10 出现Problem running post-install step. Installation may not complete correctly.The database cluster initialisation failed - 倾慕已久 - 博客园 (cnblogs.com)

 

posted @   UTA_RED  阅读(551)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
点击右上角即可分享
微信分享提示