
Estou usando um laptop com Windows 8 como meu servidor de desenvolvimento.
Estou tentando instalar o postgres no meu laptop, mas recebo o seguinte erro:
Problema ao executar a etapa pós-instalação. A instalação pode não ser concluída corretamente. A inicialização do cluster de banco de dados falhou.
Aqui está um vídeo dos meus esforços (desculpem a péssima qualidade, não usei software de captura de tela antes de hoje):
http://youtu.be/LwhqCXiji8E
Arquivo de instalação:
fixing permissions on existing directory C:/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
10
selecting default shared_buffers ... The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
400kB
creating configuration files ... ok
creating template1 database in C:/postgres/data/base/1 ... The system cannot find the path specified.
child process exited with exit code 1
initdb: removing contents of data directory "C:/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:\postgres/installer/server/initcluster.vbs" "NT AUTHORITY\NetworkService" "postgres" "****" "C:\postgres" "C:\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.
Responder1
dehttp://www.windows-commandline.com/add-user-to-group-from-command-line/
Solution:
- Uninstall PostgreSQL
- 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
- compmgmt.msc -> Local Users and Groups -> Users -> New User... -> User name: postgres, Password: postgrespass -> 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.
- 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)