SQLitePCL.raw
SQLitePCL.raw copied to clipboard
.NET 6 - ARM64 - System.DllNotFoundException: Unable to load shared library \u0027e_sqlite3\u0027 or one of its dependencies
I am using .NET 6 it working fine when i run on window machine but when i deploy to Raspberry PI ARM64 it is causing issue.
dotnet publish -c Release -r linux-arm64 --self-contained=false
Below is the log
{"EventId":10000,"LogLevel":"Error","Category":"Microsoft.EntityFrameworkCore.Update","Message":"An exception occurred in the database while saving changes for context type \u0027Praveshanam.Models.praveshanamContext\u0027.\nSystem.TypeInitializationException: The type initializer for \u0027Microsoft.Data.Sqlite.SqliteConnection\u0027 threw an exception.\n ---\u003E System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\n ---\u003E System.DllNotFoundException: Unable to load shared library \u0027e_sqlite3\u0027 or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libe_sqlite3: No such file or directory\n at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()\n at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()\n at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)\n at SQLitePCL.Batteries_V2.Init()\n --- End of inner exception stack trace ---\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Span\u00601\u0026 arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\n at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()\n at Microsoft.Data.Sqlite.SqliteConnection..cctor()\n --- End of inner exception stack trace ---\n at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)\n at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction()\n at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable\u00601 commandBatches, IRelationalConnection connection)\n at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList\u00601 entries)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList\u00601 entriesToSave)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.\u003C\u003Ec.\u003CSaveChanges\u003Eb__104_0(DbContext _, ValueTuple\u00602 t)\n at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func\u00603 operation, Func\u00603 verifySucceeded)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)","Exception":"System.TypeInitializationException: The type initializer for \u0027Microsoft.Data.Sqlite.SqliteConnection\u0027 threw an exception. ---\u003E System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---\u003E System.DllNotFoundException: Unable to load shared library \u0027e_sqlite3\u0027 or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libe_sqlite3: No such file or directory at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number() at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number() at SQLitePCL.raw.SetProvider(ISQLite3Provider imp) at SQLitePCL.Batteries_V2.Init() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span\u00601\u0026 arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize() at Microsoft.Data.Sqlite.SqliteConnection..cctor() --- End of inner exception stack trace --- at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString) at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction() at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable\u00601 commandBatches, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList\u00601 entries) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList\u00601 entriesToSave) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.\u003C\u003Ec.\u003CSaveChanges\u003Eb__104_0(DbContext _, ValueTuple\u00602 t) at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func\u00603 operation, Func\u00603 verifySucceeded) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess) at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)","State":{"Message":"An exception occurred in the database while saving changes for context type \u0027Praveshanam.Models.praveshanamContext\u0027.\nSystem.TypeInitializationException: The type initializer for \u0027Microsoft.Data.Sqlite.SqliteConnection\u0027 threw an exception.\n ---\u003E System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\n ---\u003E System.DllNotFoundException: Unable to load shared library \u0027e_sqlite3\u0027 or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libe_sqlite3: No such file or directory\n at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()\n at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()\n at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)\n at SQLitePCL.Batteries_V2.Init()\n --- End of inner exception stack trace ---\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Span\u00601\u0026 arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\n at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()\n at Microsoft.Data.Sqlite.SqliteConnection..cctor()\n --- End of inner exception stack trace ---\n at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)\n at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction()\n at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable\u00601 commandBatches, IRelationalConnection connection)\n at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList\u00601 entries)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList\u00601 entriesToSave)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.\u003C\u003Ec.\u003CSaveChanges\u003Eb__104_0(DbContext _, ValueTuple\u00602 t)\n at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func\u00603 operation, Func\u00603 verifySucceeded)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)","contextType":"Praveshanam.Models.praveshanamContext","newline":"\n","error":"System.TypeInitializationException: The type initializer for \u0027Microsoft.Data.Sqlite.SqliteConnection\u0027 threw an exception.\n ---\u003E System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.\n ---\u003E System.DllNotFoundException: Unable to load shared library \u0027e_sqlite3\u0027 or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libe_sqlite3: No such file or directory\n at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()\n at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()\n at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)\n at SQLitePCL.Batteries_V2.Init()\n --- End of inner exception stack trace ---\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Span\u00601\u0026 arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\n at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\n at Microsoft.Data.Sqlite.Utilities.BundleInitializer.Initialize()\n at Microsoft.Data.Sqlite.SqliteConnection..cctor()\n --- End of inner exception stack trace ---\n at Microsoft.Data.Sqlite.SqliteConnection..ctor(String connectionString)\n at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.CreateDbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.get_DbConnection()\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.Open(Boolean errorsExpected)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)\n at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction()\n at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable\u00601 commandBatches, IRelationalConnection connection)\n at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(IList\u00601 entries)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IList\u00601 entriesToSave)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(StateManager stateManager, Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.\u003C\u003Ec.\u003CSaveChanges\u003Eb__104_0(DbContext _, ValueTuple\u00602 t)\n at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.Execute[TState,TResult](TState state, Func\u00603 operation, Func\u00603 verifySucceeded)\n at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)\n at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)","{OriginalFormat}":"An exception occurred in the database while saving changes for context type \u0027{contextType}\u0027.{newline}{error}"}}