zonkyio / embedded-database-spring-test

A library for creating isolated embedded databases for Spring-powered integration tests.
Apache License 2.0
400 stars 37 forks source link

macOS Big Sur: fail when trying to execute "Reason: image not found" #132

Closed gabrielkirsten closed 3 years ago

gabrielkirsten commented 3 years ago

Hello folks... After I upgrade my mac to Big Sur I'm facing a problem and my friends are facing the same issue.

lib version: 1.6.0

When I try to run my application I get the following log:

2020-11-24 20:21:20.866  INFO [,,,] 17353 --- [           main] i.z.t.d.p.embedded.EmbeddedPostgres      : Detected a Darwin x86_64 system
2020-11-24 20:21:20.867  INFO [,,,] 17353 --- [           main] .z.t.d.p.e.DefaultPostgresBinaryResolver : Detected distribution: 'Unknown'
2020-11-24 20:21:20.869  INFO [,,,] 17353 --- [           main] .z.t.d.p.e.DefaultPostgresBinaryResolver : System specific postgres binaries found: postgres-darwin-x86_64.txz
2020-11-24 20:21:21.010  INFO [,,,] 17353 --- [           main] i.z.t.d.p.embedded.EmbeddedPostgres      : Postgres binaries at /var/folders/cs/b7785y7s5g5c2dh1mrdwyvqr0000gn/T/embedded-pg/PG-54fb89bb6d8eed579b8402effb4712c2
2020-11-24 20:21:21.021  INFO [,,,] 17353 --- [itdb:pid(17361)] i.z.t.d.p.embedded.EmbeddedPostgres      : dyld: Library not loaded: @loader_path/../lib/libpq.5.dylib

I tried to run the command:

/var/folders/cs/b7785y7s5g5c2dh1mrdwyvqr0000gn/T/embedded-pg/PG-54fb89bb6d8eed579b8402effb4712c2/bin/initdb -A trust -U postgres -D 

And I got the follow output:

dyld: Library not loaded: @loader_path/../lib/libpq.5.dylib
  Referenced from: /var/folders/cs/b7785y7s5g5c2dh1mrdwyvqr0000gn/T/embedded-pg/PG-54fb89bb6d8eed579b8402effb4712c2/bin/initdb
  Reason: image not found
[1]    17414 abort       -A trust -U postgres -D  -E UTF-8

Thanks in advance.

NoxFr commented 3 years ago

I've also got the issue. (These macos updates, always a mess)

NoxFr commented 3 years ago

Any update on this ? All of our test suite is unrunnable on MacOs Big Sur :-(

tomix26 commented 3 years ago

This issue should be fixed in newer versions of embedded postgres binaries (https://github.com/zonkyio/embedded-postgres-binaries/issues/17), but coincidentally, another issue has appeared (https://github.com/zonkyio/embedded-postgres-binaries/issues/21) at the same time that prevents these newer versions from being used on newer versions of mac os. So it is necessary to re-release versions 9.4.25, 9.5.20, 9.6.16, 10.11.0, 11.6.0, 12.1.0 to include this fix. I'll try to do it today.

NoxFr commented 3 years ago

Ok good news thanks

tomix26 commented 3 years ago

Fixed by #136.