StarBlog icon indicating copy to clipboard operation
StarBlog copied to clipboard

ubuntu平台下发布访问报错,老哥研究研究?

Open LiuHua99 opened this issue 1 year ago • 6 comments

{ "statusCode": 500, "successful": false, "message": "FreeSql: The FreeSql: Master Database status is unavailable and cannot be used until the background checker is restored. FreeSql: Connection string error, or check project properties > Build > Target Platform: x86 | x64, Or use FreeSql.Provider.SqliteCore accessing arm platform", "data": {}, "errorData": null }

LiuHua99 avatar Sep 26 '23 08:09 LiuHua99

你的设备和系统信息是?

Deali-Axy avatar Sep 26 '23 15:09 Deali-Axy

你的设备和系统信息是?

虚拟机,ubuntu 22.04

LiuHua99 avatar Sep 27 '23 02:09 LiuHua99

使用sqlite作为数据库,发布后需要带上

  • libe_sqlite3.so
  • SQLite.Interop.dll

这些依赖

请检查发布目录有没有这些文件。


另外从报错信息来看

Or use FreeSql.Provider.SqliteCore accessing arm platform

似乎是发布的架构和实际运行的架构不一致,有可能是发布了x86/64的版本,在ARM的服务器上运行,这块也检查一下。

Deali-Axy avatar Sep 27 '23 07:09 Deali-Axy

使用sqlite作为数据库,发布后需要带上

  • libe_sqlite3.so
  • SQLite.Interop.dll

这些依赖

请检查发布目录有没有这些文件。

另外从报错信息来看

Or use FreeSql.Provider.SqliteCore accessing arm platform

似乎是发布的架构和实际运行的架构不一致,有可能是发布了x86/64的版本,在ARM的服务器上运行,这块也检查一下。

ok 国庆几天我研究一下。谢了

LiuHua99 avatar Sep 27 '23 08:09 LiuHua99

今天正好遇到了这个问题,一摸一样的,发布的时候需要发布到对应版本,如果是windows电脑发布,那么选择any cpu就可以,检查一下对应发布目录下/runtimes/linux-arm64(或linux-x64,具体要看你ubuntu的cpu版本)/native/libe_sqlite3.so文件是否存在

spatxos avatar Jan 11 '24 09:01 spatxos

如果使用 Rider 作为开发工具,可以参考我的 publish 方案

image

Deali-Axy avatar Feb 01 '24 14:02 Deali-Axy