gpt4 book ai didi

windows - Win 10 Postgresql 11 数据库集群初始化失败

转载 作者:可可西里 更新时间:2023-11-01 09:32:10 26 4
gpt4 key购买 nike

我从戴尔 (XPS 15) 买了一台新的笔记本电脑,装有 Windows 10 专业版。在安装 postgres 期间,我总是遇到同样的问题“运行安装后步骤时出现问题。安装可能无法正确完成。数据库集群初始化失败。” .

我尝试了很多过去线程的解决方案:不将 postgres 安装到程序文件中创建一个名为 postgres 的用户,对 postgress 目录具有完全访问权限,此处解释 https://www.youtube.com/watch?v=pS_zWDDDSe0检查新的 win-updates关闭 Windows 的防火墙和杀毒软件。

Error running cscript //NoLogo "C:\develop\postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\develop\postgres" "C:\develop\postgres\data" 5432 "DEFAULT" 0: Program ended with an error exit code Problem running post-install step. Installation may not complete correctly The database cluster initialisation failed. [14:03:49] Delete the temporary scripts directory... Creating menu shortcuts... Executing cscript //NoLogo "C:\develop\postgres\installer\server\createshortcuts_clt.vbs" "PostgreSQL 11" "C:\develop\postgres" Script exit code: 0

编辑错误日志

Executing batch file 'radAD31B.bat'...
The program "postgres" was found by "C:/develop/postgres/bin/initdb.exe" but was not the same version as initdb.

最佳答案

我刚刚为此苦苦挣扎了几个小时,所以我将其发布给任何其他来到这里的人。

最初,我只能在 pgsql-bugs 邮件列表中找到两个错误报告:

BUG #15856: The program "postgres" was found by "initdb" but was not the same version as initdb.

BUG #15970: Db initialization error - initdb.exe and postgres not same version

具体症状是:

The program "postgres" was found by ".../initdb.exe" but was not the same version as initdb.

虽然版本匹配,但您会得到:

C:\Program Files\PostgreSQL\11\bin>postgres -V
WARNING: 01000: could not determine encoding for locale
"<some encoding>.utf8": codeset is "CPutf8"

如果这些是您的症状,则问题在于您将区域/语言设置设置为使用 UTF-8(测试版设置)。这会导致很多程序出现问题,PostgreSQL 就是其中之一。禁用它并重新安装,你应该没问题。

UTF8 Region Settings screenshot

关于windows - Win 10 Postgresql 11 数据库集群初始化失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54631443/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com