https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

Fabio Beoni

11/28/2023, 7:59 PM
Hi guys, I am trying to uses #*Kotbase* with KMP and running a desktop app... I get the following error:
Copy code
libLiteCore.so: libicuuc.so.71: cannot open shared object file: No such file or directory
while opening the DB:
Copy code
Database("notes-db", DatabaseConfigurationFactory.newConfig("/home/me"))
In the docs you can read (https://kotbase.dev/databases/#create-or-open-database):
Copy code
val database = Database(
    "my-db",
    DatabaseConfigurationFactory.newConfig(
        "path/to/database"
    )
)

// "path/to/database" might be a platform-specific location. Use expect/actual or dependency injection to provide a platform-specific database path.
p

Pablichjenkov

11/28/2023, 8:12 PM
I strongly advise opening an issue in the repo
j

Jeff Lockhart

11/28/2023, 8:13 PM
Hi, Fabio. On Linux the libicu library is required. I mention this in the docs here and on the readme, but the requirement is more than just for development on the library so I should probably highlight it somewhere else in the readme. It's a requirement for either the native Linux or the JVM target running on Linux. So I should probably also mention that in the JVM section as well.
Couchbase Lite requires a specific version of libicu. The error message indicates it requires v71 for the current 3.0 version, which may or may not be available from the package manager for the Linux distribution you're using. You may find it on a previous version of your distribution's package manager archive, or you can download it directly from GitHub.
f

Fabio Beoni

11/28/2023, 8:28 PM
Okay thanks so much... I read about the libs required under linux but I did not get the link with this error since it was mentioning "No such file or Dir" making me think to some error in the path... Many thanks.
j

Jeff Lockhart

11/28/2023, 8:30 PM
Yeah, the error is a bit cryptic in that sense, especially in the context of creating a database file. Essentially it can't find the libicu dependency shared object .so file.
Let me know if these docs changes make things clearer.