1

I'm trying to install postgreSQL on my windows 10 computer for the first time. I got an error at the end of the installation saying that there was a "problem running post-install step. Installation may not complete correctly. The database cluster initialization failed."

When I run the sql shell I get an error trying to do the default login that says 'chcp' is not recognized as an internal or external command. I set the environmental path variable to the bin of the Postgres folder in my program files. I also tried a number of other (but very dated) solutions to similar problems users experienced such as moving my data directory outside of the Postgres directory entirely. Most of these solutions date back to 2012 and don't seem to work anymore.

The one that seemed closest to working is postgresql installation failed.

However, I can't find "postgres" as a user. I get an error saying: "An object named "postgres" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection."

Does anybody have any updated solutions/tips for this?

4
  • The Windows installer does not create a separate postgres user any more (since 9.0 I think). Did you select to put the data directory into C:\Program Files? It's a very annoying (and wrong in my opinion) default in the Windows installer, so you need to actively change that location. That directory is not writeable for regular users. Use some other directory with less restrictive privileges. Commented Aug 25, 2017 at 6:23
  • Yes I did, that was one of the earlier steps in the thread I listed. I think for the most part it's not a huge problem but I still get a chcp not recognized error so I am somewhat worried. Commented Aug 25, 2017 at 7:28
  • chcp is not called (or needed) when initializing the database cluster through initdb. It is also a standard command line program in Windows. If it's not found then something is messed up with your PATH content. Did the installer write a logfile? (I don't use the installer, I always just unzip the ZIP archive and run initdb manually) Commented Aug 25, 2017 at 7:33
  • stackoverflow.com/questions/23533980/… Commented Dec 10, 2020 at 13:34

1 Answer 1

0

What worked for me was to install the C++ build tools from Visual Studio. I was installing it on a new device, and this resolved the issue.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.