Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Postgres binary found for Windows / x86 #144

Closed
andrewriver opened this issue Apr 25, 2020 · 7 comments
Closed

No Postgres binary found for Windows / x86 #144

andrewriver opened this issue Apr 25, 2020 · 7 comments

Comments

@andrewriver
Copy link

When running mvn clean install I'm getting this error in one of my tests where I use embedded postgres. I think is something related with Unable to run on Windows or Illegal State issue from initdb, but I haven't found the solution regardless the actions suggested there.

Environment:

  • Windows Server 2016 Datacenter x64
  • Java 8
  • Maven 3.6.3
  • otj-pg-embedded 0.13.3

Error:

 INFO com.opentable.db.postgres.embedded.EmbeddedPostgres - Detected a Windows x86 system
<<< ERROR!
java.lang.IllegalStateException: No Postgres binary found for Windows / x86

Any help would be so appreciated.
Thanks.

@mikebell90
Copy link
Contributor

We don’t support 32 bit sorry .

@andrewriver
Copy link
Author

Thanks @mikebell90 , but my system is not 32bit:
system

@pumbabughunter
Copy link

@andrewriver ,
this most likely happened since system property for os.arch is x64, while EmbeddedPostgres expects x86_64 as t tries to match your OS parameters against the following supported binaries:

postgresql-Darwin-x86_64.txz
postgresql-Linux-x86_64.txz
postgresql-Windows-x86_64.txz

So if you manually set the system property os.arch to x86_64, it will find the required binary file and launch it successfully.

@andrewriver
Copy link
Author

@pumbabughunter Thank you for your suggestion.
Couple of days ago I realized that I had installed the windows x86 JDK version.
I downloaded and installed x64 JDK version and that worked! 😅

@cher1998
Copy link

@andrewriver Hey, Can you please explain the steps you have followed to solve the issue

@Viktoripi1
Copy link

Hey @cher1998, I had the same issue and what I did to fix it was:
1.install x64 JDK version
[https://www.oracle.com/java/technologies/java-archive-javase10-downloads.html]
2. (I use eclipse) changed in the project properties the version it shoud use
[Right click your project > properties
Select “Java Build Path” on left, then “JRE System Library”, click Edit…
Select "Workspace Default JRE"
Click "Installed JREs"
If you see JRE you want in the list select it (selecting a JDK is OK too)
If not, click Search…, navigate to Computer > Windows C: > Program Files > Java, then click OK
Now you should see all installed JREs, select the one you want
Click OK/Finish a million times]
and done...

@mikebell90
Copy link
Contributor

As noted we've released 1.0.0 which is testcontainers based. We expect this resolves the issue, assuming postgres maintains an x86 docker image, and while PRs are welcome against the legacy branch, we are not planning on formally maintaining pre-1.xx code base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants