Failed to load sql modules into the database cluster
原因
在windows10上安装PostgreSQL时报错:Failed to load sql modules into the database cluster
这是因为在安装时,安装包无法自动创建postgres用户
解决方法
- 将安装失败的软件删除,并将文件夹也一并删除
- 主动创建postgres本地用户并设置密码,创建用户方法
- 然后重启电脑,使用原有的用户进行登录
- 使用 windows+R键,输入以下命令(在cmd切换到postgres,输入密码)
runas /user:postgres cmd.exe
- 在cmd命令中安装PostgreSQL
- 将postgresql安装包拖入cmd命令行
- 回车后就继续进行安装操作