Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libSQLite.Interop not found Mac OS | M1

I am using dotnet 6 on a M1 Pro, and am struggling to use the SQLite-Package.

System.DllNotFoundException: Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies.

This is the error that is thrown, whenever I try to run the application. Building however works fine.

like image 569
Linsane Avatar asked Apr 20 '26 18:04

Linsane


1 Answers

As a workaround to sqlite not yet targeting arm64, you can use the .net 6 x64 architecture.

  • Install .net 6 x64 from here.
  • Configure your IDE (or terminal) to use .net x64. This will vary by IDE, but in Rider:
    • Press CMD , to open preferences
    • Navigate to "Toolset and build" section
    • Change the .NET CLI executable path to /usr/local/share/dotnet/x64/dotnet

enter image description here

like image 127
Noel Avatar answered Apr 23 '26 07:04

Noel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!