StarBlog
StarBlog copied to clipboard
ubuntu平台下发布访问报错,老哥研究研究?
{ "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 }
你的设备和系统信息是?
你的设备和系统信息是?
虚拟机,ubuntu 22.04
使用sqlite作为数据库,发布后需要带上
-
libe_sqlite3.so
-
SQLite.Interop.dll
这些依赖
请检查发布目录有没有这些文件。
另外从报错信息来看
Or use FreeSql.Provider.SqliteCore accessing arm platform
似乎是发布的架构和实际运行的架构不一致,有可能是发布了x86/64的版本,在ARM的服务器上运行,这块也检查一下。
使用sqlite作为数据库,发布后需要带上
libe_sqlite3.so
SQLite.Interop.dll
这些依赖
请检查发布目录有没有这些文件。
另外从报错信息来看
Or use FreeSql.Provider.SqliteCore accessing arm platform
似乎是发布的架构和实际运行的架构不一致,有可能是发布了x86/64的版本,在ARM的服务器上运行,这块也检查一下。
ok 国庆几天我研究一下。谢了
今天正好遇到了这个问题,一摸一样的,发布的时候需要发布到对应版本,如果是windows电脑发布,那么选择any cpu就可以,检查一下对应发布目录下/runtimes/linux-arm64(或linux-x64,具体要看你ubuntu的cpu版本)/native/libe_sqlite3.so文件是否存在
如果使用 Rider 作为开发工具,可以参考我的 publish 方案