couchbase/couchbase-lite-java-ce-root

Pls Help ! libicuuc.so.54: cannot open

pigochu opened this issue · 1 comments

I want to write a java console app for test sync-gateway.

My os is Ubuntu 22.04 on WSL2.

How to fix those error ?

Exception in thread "main" java.lang.IllegalStateException: Cannot load native library libLiteCore.so @/home/pigo/projects/SyncTest/app/CouchbaseLiteTemp/4f99b0f91abe5fe6f2b55a2c50195a6a/libLiteCore.so for Linux/amd64
        at com.couchbase.lite.internal.NativeLibrary.load(NativeLibrary.java:113)
        at com.couchbase.lite.internal.CouchbaseLiteInternal.init(CouchbaseLiteInternal.java:80)
        at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:54)
        at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:42)
        at com.couchbase.lite.CouchbaseLite.init(CouchbaseLite.java:33)
        at synctest.App.main(App.java:16)
Caused by: java.lang.UnsatisfiedLinkError: /home/pigo/projects/SyncTest/app/CouchbaseLiteTemp/4f99b0f91abe5fe6f2b55a2c50195a6a/libLiteCore.so: libicuuc.so.54: cannot open shared object file: No such file or directory
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:395)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:234)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:176)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
        at java.base/java.lang.Runtime.load0(Runtime.java:785)
        at java.base/java.lang.System.load(System.java:1979)
        at com.couchbase.lite.internal.NativeLibrary.load(NativeLibrary.java:109)
        ... 5 more

You will get better attention to questions like this, on our forum:
https://forums.couchbase.com/tag/mobile

You need to put the necessary libraries on Java's library path. Please follow the instructions here:
https://docs.couchbase.com/couchbase-lite/current/java/gs-prereqs.html#using-native-libraries-for-linux