[Question] How can I use Jest-dynamodb in Apple Silicon?
See original GitHub issueDynamodb-local seems to be not compatible with Apple Silicon
Dec 24, 2021 9:26:36 PM com.almworks.sqlite4java.Internal log WARNING: [sqlite] cannot open DB[1]: com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 0x0001): tried: '/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/libsqlite4java-osx.dylib' (no such file) Dec 24, 2021 9:26:36 PM com.almworks.sqlite4java.Internal log SEVERE: [sqlite] SQLiteQueue[]: error running job queue com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 0x0001): tried: '/private/var/folders/q2/smpmq5gs1vlclkfn3s971b800000gp/T/dynamodb-local/DynamoDBLocal_lib/libsqlite4java-osx.dylib' (fat file, but missing compatible architecture (have 'i386,x86_64', need 'arm64e')), '/usr/lib/libsqlite4java-osx.dylib' (no such file) at com.almworks.sqlite4java.SQLite.loadLibrary(SQLite.java:97) at com.almworks.sqlite4java.SQLiteConnection.open0(SQLiteConnection.java:1441) at com.almworks.sqlite4java.SQLiteConnection.open(SQLiteConnection.java:282) at com.almworks.sqlite4java.SQLiteConnection.open(SQLiteConnection.java:293) at com.almworks.sqlite4java.SQLiteQueue.openConnection(SQLiteQueue.java:464) at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:641) at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623) at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77) at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205) at java.base/java.lang.Thread.run(Thread.java:833) ...
According to the log, sqlite4java cannot find the corresponding support platform for Apple Silicon - (fat file, but missing compatible architecture (have ‘i386,x86_64’, need ‘arm64e’)
As the last update of the sqlite4db was before Apple M1 release, Jest-dynamodb is based on dynamodb-local which is based on sqlite4db.
Is there any suggestion on how to solve this issue? is it possible to wrap the docker version for the Jest-dynamodb?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
For those who read this thread, I just found the other “fix” - there is a community build for the sqlite4java for M1. Download it from https://search.maven.org/artifact/io.github.ganadist.sqlite4java/libsqlite4java-osx-arm64/1.0.392/dylib and replace ibsqlite4java-osx.dylib. (use it as your own risk)
Slightly details instruction https://www.josephso.dev/using-jest-dynamodb-in-apple-silicon-platform-workaround/#community-build
For future readers,
jest-dynamodb
works fine on my Apple Silicon M1 machine in Oct 2022.