gpt4 book ai didi

java - M1苹果硅mac上的Dynamodb本地设置

转载 作者:行者123 更新时间:2023-12-04 12:22:53 26 4
gpt4 key购买 nike

我使用 https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html 对 dynamodb 进行了本地设置
我可以使用以下命令启动实例 java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb但是当我尝试做任何其他事情时,它给了我以下错误。

Mar 15, 2021 2:10:28 PM com.almworks.sqlite4java.Internal logWARNING: [sqlite] cannot open DB[15]: com.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 1): no suitable image found. Did find:/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapper/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapperMar 15, 2021 2:10:28 PM com.almworks.sqlite4java.Internal logSEVERE: [sqlite] SQLiteQueue[shared-local-instance.db]: error running job queuecom.almworks.sqlite4java.SQLiteException: [-91] cannot load library: java.lang.UnsatisfiedLinkError: /Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 1): no suitable image found. Did find:/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapper/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapperat 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(Unknown Source)Caused by: java.lang.UnsatisfiedLinkError: /Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: dlopen(/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib, 1): no suitable image found. Did find:/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapper/Users/ahsanejaz/Downloads/dynamodb_local_latest/DynamoDBLocal_lib/libsqlite4java-osx.dylib: no matching architecture in universal wrapperat java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)at java.base/java.lang.ClassLoader$NativeLibrary.load(Unknown Source)at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(Unknown Source)at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)at java.base/java.lang.Runtime.load0(Unknown Source)at java.base/java.lang.System.load(Unknown Source)at com.almworks.sqlite4java.Internal.tryLoadFromPath(Internal.java:340)at com.almworks.sqlite4java.Internal.loadLibraryX(Internal.java:117)at com.almworks.sqlite4java.SQLite.loadLibrary(SQLite.java:95)... 9 moreMar 15, 2021 2:10:28 PM com.almworks.sqlite4java.Internal logWARNING: [sqlite] SQLiteQueue[shared-local-instance.db]: stopped abnormally, reincarnatingin 3000ms


这个问题是否与新的 M1 Apple Silicon 架构有关?有什么解决方法吗?

最佳答案

我能够运行 DynamoDB 安装 Java 版本 x86-64 架构而不是 arm64 并从 rosetta 终端启动它

java --version 
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)
OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode, sharing)
https://www.azul.com/downloads/zulu-community/?version=java-16-sts&os=macos&architecture=x86-64-bit&package=jre

关于java - M1苹果硅mac上的Dynamodb本地设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66635424/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com