IanusInferus / termux-mono

Build mono on Termux (Android terminal)
78 stars 10 forks source link

Cannot found "libsqlite3.so.0" When I try to execute TerrariaServer.exe #15

Closed Duck15 closed 2 years ago

Duck15 commented 2 years ago

When I try to execute TerrariaServer.exe,I saw these errors

like this:

~/downloads $ ./local/bin/mono TerrariaServer.exe
Error Logging Enabled.
TerrariaAPI Version: 2.1.0.0 (Protocol v1.4.3.6 (248), OTAPI 1.4.3.6)
TShock was improperly shut down. Please use the exit command in the future to prevent this.
Fatal Startup Exception
System.Exception: Fatal TShock initialization exception: failed to connect to MySQL database. See inner exception for details. ---> System.DllNotFoundException: libsqlite3.so.0 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Mono.Data.Sqlite.UnsafeNativeMethods.sqlite3_open_v2(byte[],intptr&,int,intptr)
  at Mono.Data.Sqlite.SQLite3.Open (System.String strFilename, Mono.Data.Sqlite.SQLiteOpenFlagsEnum flags, System.Int32 maxPoolSize, System.Boolean usePool) [0x00046] in <2f714ef98a8f4e73b149f84ee80555a1>:0
  at Mono.Data.Sqlite.SqliteConnection.Open () [0x0021a] in <2f714ef98a8f4e73b149f84ee80555a1>:0
  at TShockAPI.DB.DbExt.QueryReader (System.Data.IDbConnection olddb, System.String query, System.Object[] args) [0x00007] in <a320748a76594c1fac9736170a0aea47>:0
   --- End of inner exception stack trace ---
  at TShockAPI.DB.DbExt.QueryReader (System.Data.IDbConnection olddb, System.String query, System.Object[] args) [0x0006b] in <a320748a76594c1fac9736170a0aea47>:0
  at TShockAPI.DB.SqlTableCreator.GetColumns (TShockAPI.DB.SqlTable table) [0x00035] in <a320748a76594c1fac9736170a0aea47>:0
  at TShockAPI.DB.SqlTableCreator.EnsureTableStructure (TShockAPI.DB.SqlTable table) [0x0000d] in <a320748a76594c1fac9736170a0aea47>:0
  at TShockAPI.DB.BanManager..ctor (System.Data.IDbConnection db) [0x000e7] in <a320748a76594c1fac9736170a0aea47>:0
  at TShockAPI.TShock.Initialize () [0x00405] in <a320748a76594c1fac9736170a0aea47>:0

The version I use is : mono-termux.6.12.0.122-arm64-android24.tar.xz The file to be executed is : TShock4.5.17_Terraria_1.4.3.6.zip

Can you tell me how to solve them? (In the debian_aarch64 container, it can run normally)

IanusInferus commented 2 years ago

You are depending on native library sqlite3 but you only have sqlite3.dll for Windows. You can get libsqlite3.so in /data/data/com.termux/files/usr/lib with the following command in termux.

pkg install libsqlite