postgres installation the database cluster initialization failed ( Postgresql Version 9.4.4 )

ⅰ亾dé卋堺 提交于 2019-12-23 11:00:44

问题


I can't install Postgresql. I've tried everything:

  • I run the setup as Administrator.
  • I create a postgresql user an I add it to the Administrator group.
  • I install it directly on C:\postgresql.

but without any success. for information: I have windows 8


回答1:


  • First of all run the set-up as administrator.
  • Choose the installation folder inside program files( default)
  • But chose your data location outside from above folder to somewhere else ( c:\postgres data or something.)



回答2:


Just don't use EDB installer. There is BigSQL alternative now.




回答3:


it's 2019, and I still have the same issue with Postgres 11. Before that, I remove the current Postgres 9.6 (if I remember the version correctly), and attempt to install the new one Postgres 11, and got the issue. I have try these following approaches, but none of them work:

  • Run installation as Administrator on every run -> failed
  • Choose the default installation folder that the setup prompted (C:/Program Files/PostgresSQL/11), and the data folder reside at other place -> failed
  • Install it on a place outside C:/ -> still failed

The only approach that I luckily found after scratching my head nearly the whole day is with this post
I would like to quickly recap the solution in case the the link expired

Solution:
- Uninstall PostgreSQL
- CMD: net user postgres /delete
- Control Panel -> User Accounts -> Configure advanced user profile properties -> delete all "Unknown User" instances that seem to be left from postgres
- Run > compmgmt.msc -> Local Users and Groups -> Users -> New User... -> User name: postgres, Password: postgres -> Create
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add... -> Administrators -> OK
- copy postgresql-8.4.9-1-windows.exe to C:\
- runas /user:postgres cmd.exe -> cd \ -> postgresql-8.4.9-1-windows.exe -> installed successfully without errors. Checked data folder and confirmed files created successfully. (this mean you must run the installation with the created postgres user)
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Administrators -> Remove
- compmgmt.msc -> Local Users and Groups -> Users -> postgres -> Member of -> Add... -> Power Users -> OK
- Installed HM2 -> created db successfully
- Restarted computer -> HM2 runs properly (i.e. just to check postgresql service starts automatically)

Pro Tips: To get an insight of the installation log, go to %TEMP% folder by searching for "%TEMP%" in the task bar, the log name would be bitrock_installer-xxx.log. You would want to know what is going on to troubleshoot the issue faster.




回答4:


I was installing the Postgres version 9.5 (On windows 7 and using the DBEnterprise installer)... for me, the problem seems to be that I was selecting "POSIX" as Regional Configuration... But I tried with the "C" Regional Configuration, and the installation finished without any problem...

Also, I run the installer as Administrator!




回答5:


I was facing the same issue on trying to install postgres 10.3.Running as the administrator didn't help me. But it got installed properly when i changed the installation directory from the default one which is inside Program Files.Instead i created a new folder inside the C drive and made it the installation directory.




回答6:


Problem solved:

run the setup as Administrador and use Windows 7 mode




回答7:


Possible solution for 10.3. version:

  1. Download PostgreSQL installation file

  2. Move downloaded file to C:\ drive.
    Example: C:\postgresql-10.3-2-windows-x64.exe

  3. Create directory named PostgreSQL in C:\ drive

  4. Create directory named 10 in previously created PostgreSQL directory.
    So you need to have C:\PostgreSQL\10.

  5. Run C:\postgresql-10.3-2-windows-x64.exe (DO NOT CLICK ON 'RUN AS ADMIN', just double click)

  6. Change installation directory path to C:\PostgreSQL

  7. Change data directory path to C:\PostgreSQL\data

  8. Finish

Hopefully, installation should be successful.




回答8:


I followed steps suggested by @IsoNecroMad and it worked

1) First of all, run the set-up as administrator.

2) Choose the installation folder inside program files( default)

3) But chose your data location outside from above folder to somewhere else ( c:\postgres data or something.)



来源:https://stackoverflow.com/questions/32453451/postgres-installation-the-database-cluster-initialization-failed-postgresql-ve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!