我试图通过EnterpriseDB.com安装包在我的电脑上安装PostgreSQL 9.6.2。每次我在最后得到这个错误:在Windows 8.1上安装PostgreSQL - 数据库集群初始化失败
Problem running post-install step. Installation may not complete correctly
The database cluster initialisation failed.
我做了一些谷歌上搜索,发现了几个“解决方案”这个问题,但他们没有为我工作。我使用的是Windows 8.1,即“普通”版本,而不是“Pro”版本。这些解决方案大部分都是针对Win 7或Vista的。安装PostgreSQL的原因是使用PostGIS来创建地图应用程序。
它为Win 7专业版写的,所以我不得不做diffrently几件事情 - 例如COMPMGMT.MSC不包含用户和组什么,所以我去lusrmgr .msc - 但它对我说,它不适用于我的Windows版本(我可能需要Pro版本)。所以我通过设置创建了新用户,通过控制面板授予他管理员权限,并尝试按照说明书中的说明通过CMD进行安装。那么,没有工作,仍然有同样的错误。
它适用于Windows Vista,但无论如何我都是这样。起初,我将它安装在Program Files(C:\ Hry \ postgres)之外的其他文件夹中,得到了同样的错误。然后我尝试在文章中创建用户postgres,但是当我想为文件夹分配权限时,我得到了像这样的stm错误(我的Win不是英文的,所以我以最好的方式翻译它我可以):
Error occured during attempt to use security information for:
C:\Hry\postgres\bin
Unable to load list of objects in the container. Access denied.
和postgres的每个子文件夹相同。我仍然尝试将安装重新安装到文章中建议的相同文件夹中,但没有任何问题,但仍然是相同的错误。
我包括安装,PostgreSQL的日志中的最后几行,如果它会帮助别人与查明的问题是:
Called CreateDirectory(C:\Hry\postgres\data)...
Called CreateDirectory(C:\Hry\postgres)...
WScript.Network initialized...
strParentOfDataDirC:\Hry\postgres
logged in userPETR\Petr
Called AclCheck(C:\Hry\postgres\data)
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.3
MajorVersion:6
Executing icacls to ensure the PETR\Petr account can read the path C:\Hry\postgres\data
Executing batch file 'rad1F88F.bat'...
'icacls' is not recognized as an internal or external command,
operable program or batch file.
Called IsVistaOrNewer()...
'winmgmts' object initialized...
Version:6.3
MajorVersion:6
Ensuring we can write to the data directory (using icacls) to PETR\Petr:
Executing batch file 'rad1F88F.bat'...
'icacls' is not recognized as an internal or external command, operable program or batch file.
Failed to ensure the data directory is accessible (C:\Hry\postgres\data)
Called Die(Failed to initialise the database cluster with initdb)...
Failed to initialise the database cluster with initdb
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Hry\postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Hry\postgres" "C:\Hry\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.
在这一点上,我花了几个小时就这个问题和我正在用尽想法。任何帮助将不胜感激。首先十分感谢。
如果你有一个64位系统,你可以试试,如果你有更好的bigsql运气。可以使用gui版本https://www.bigsql.org/postgresql/installers.jsp或cli https://www.bigsql.org/package-manager.jsp。否则,通常可以通过手动调整权限,运行initdb和注册服务来修复企业数据库安装失败。 – Eelke