无法在 Windows 10 上安装 Postgresql

2024-05-25

我第一次尝试在我的 Windows 10 计算机上安装 postgreSQL。安装结束时出现两个错误

1) 集群初始化期间发生非致命错误。请检查 C:\users\abc\AppData\Local\Temp 中的安装日志了解详细信息

2) 运行安装后步骤时出现问题。安装可能无法正确完成。无法启动数据库服务器。

我还尝试了许多其他(但非常过时)的解决方案来解决用户遇到的类似问题,例如将我的数据目录完全移到 Postgres 目录之外。这些解决方案中的大多数都可以追溯到历史上,并且似乎不再起作用。

最接近工作的一个是 [PostgreSQL 数据库集群初始化失败的解决方案][1]

但是,我找不到“postgres”作为用户。我收到一条错误消息:“找不到名为“postgres”的对象。请检查所选对象类型和位置的准确性,并确保您正确键入了对象名称,或者从选择中删除该对象。”

有人对此有任何更新的解决方案/提示吗?

请查看日志:我在下面添加了更多日志。

> Log started 09/08/2017 at 15:35:34
Preferred installation mode : qt
Trying to init installer in mode qt
Mode qt successfully initialized
Executing C:\Users\skum\AppData\Local\Temp/postgresql_installer_c42ee2159f/temp_check_comspec.bat 
Script exit code: 0

Script output:
 "test ok"

Script stderr:


Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Data Directory. Setting variable iDataDirectory to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service ID. Setting variable iServiceName to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Service Account. Setting variable iServiceAccount to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Super User. Setting variable iSuperuser to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 Branding. Setting variable iBranding to empty value
Could not find registry key HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.6 DisableStackBuilder. Setting variable iDisableStackBuilder to empty value
[15:35:38] Existing base directory: C:\Users\skum\postgres_inst
[15:35:38] Existing data directory: 
[15:35:38] Using branding: PostgreSQL 9.6
[15:35:38] Using Super User: postgres and Service Account: NT AUTHORITY\NetworkService
[15:35:38] Using Service Name: postgresql-x64-9.6
Executing cscript //NoLogo "C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\prerun_checks.vbs"
Script exit code: 0

Script output:
 The scripting host appears to be functional.

Script stderr:


Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x64.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\vcredist_x86.exe /passive /norestart
Script exit code: 0

Script output:


Script stderr:


Executing C:\Users\skum\AppData\Local\Temp\postgresql_installer_c42ee2159f\getlocales.exe 
Script exit code: 0

Logs Part 1:

Failed to ensure the data directory is accessible (C:\Users\skum\postgresqlData)
Executing batch file 'radB66AD.bat'...
The files belonging to this database system will be owned by user "skum".
This user must also own the server process.

The database cluster will be initialized with locale "English_United States.1252".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory C:/Users/skum/postgresqlData ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    "C:\Users\skum\postgres_inst\bin\pg_ctl" -D "C:\Users\skum\postgresqlData" -l logfile start


Reading:    C:\Users\skum\postgresqlData\postgresql.conf exists...
Writing:    C:\Users\skum\postgresqlData\postgresql.conf exists...
Called AclCheck(C:\Users\skum\postgresqlData)
Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Executing icacls to ensure the NT AUTHORITY\NetworkService account can read the path C:\Users\skum\postgresqlData
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Called IsVistaOrNewer()...
    'winmgmts' object initialized...
    Version:10.
    MajorVersion:10
Granting service account access to the data directory (using icacls) to NT AUTHORITY\NetworkService:
    Executing batch file 'radB66AD.bat'...
    'icacls' is not recognized as an internal or external command,
operable program or batch file.

Failed to grant service account access to the data directory (C:\Users\skum\postgresqlData)
initcluster.vbs ran to completion

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:\Users\skum\postgres_inst/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" 5432 "DEFAULT" 0: Program ended with an error exit code
Configuring database server startup...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startupcfg.vbs" 9.6 "NT AUTHORITY\NetworkService" "****" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 startupcfg.vbs ran to completion

Script stderr:


Creating menu shortcuts...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\createshortcuts.vbs" 9.6 "postgres" 5432 "PostgreSQL 9.6" "C:\Users\skum\postgres_inst" "C:\Users\skum\postgresqlData" "postgresql-x64-9.6"
Script exit code: 0

Script output:
 Start FixupFile(C:\Users\skum\postgres_inst\scripts\serverctl.vbs)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
Start FixupFile(C:\Users\skum\postgres_inst\scripts\runpsql.bat)...
   Opening file for reading...
   Closing file (reading)...
   Replacing placeholders...
   Opening file for writing...
   Closing file...
  End FixupFile()...
createshortcuts.vbs ran to completion

Script stderr:


Starting the database server...
Executing cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6
Script exit code: 1

Script output:
 Starting postgresql-x64-9.6
Failed to start the database server (2)

Script stderr:
 Program ended with an error exit code

Error running cscript //NoLogo "C:\Users\skum\postgres_inst\installer\server\startserver.vbs" postgresql-x64-9.6: Program ended with an error exit code
Problem running post-install step. Installation may not complete correctly
 Failed to start the database server.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 09/08/2017 at 15:41:35

None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法在 Windows 10 上安装 Postgresql 的相关文章

随机推荐