ericsink / SQLitePCL.raw

A Portable Class Library (PCL) for low-level (raw) access to SQLite
Apache License 2.0
525 stars 109 forks source link

System.DllNotFoundException: Unable to load shared library 'sqlcipher' or one of its dependencies #306

Closed CaseAlexander closed 4 years ago

CaseAlexander commented 4 years ago

We are trying to use a Net Core 2.0 application on the Raspberry Pi 3b+ Linux Arm with SqlCipher. We are using the SQLitePCLRaw.bundle_sqlcipher 1.1.14 reference and am getting the following exception: Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'sqlcipher' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libsqlcipher: cannot open shared object file: No such file or directory at SQLitePCL.SQLite3Provider_sqlcipher.NativeMethods.sqlite3_libversion_number() at SQLitePCL.SQLite3Provider_sqlcipher.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number() at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)

Any suggestions?

ericsink commented 4 years ago

That version didn't have a sqlcipher build for linux/arm.

SQLitePCLRaw.bundle_sqlcipher brings in SQLitePCLRaw.lib.sqlcipher.linux, and if you unzip and look in there, you'll see that there are no arm builds.

In SQLitePCLRaw 2.0, the unofficial sqlcipher builds have been renamed e_sqlcipher, so the package IDs have changed a bit. You'll need SQLitePCLRaw.bundle_e_sqlcipher, which brings in SQLitePCLRaw.lib.e_sqlcipher, which does appear to contain the build(s) you need.

CaseAlexander commented 4 years ago

So awesome, thank you. Just tried that and it works. Thank you so much for the prompt reply!