I am working on a mail client in flutter. I am using objectbox in my flutter app to store mails in cache, but when I built the app using command
flutter build linux --release
And created an executable, which runs fine on my device, but when ran on other devices, it gives the following error
./my_project: error while loading shared libraries: libobjectbox.so: cannot open shared object file: No such file or directory
I tried finding the file and it was n the bundle/lib directory, but still it shows no such file.
2
Answers
Seems like your application called "my_project". To inspect the its system library dependencies, use the following commands:
To wrap up this application for distribution, include everything in the bundle directory and verify the target linux system has all required sys libraries.
You can use the following command:
You can download a copy of the libobjectbox.so library using
Then ship the
libobjectbox.so
with your application executable in alib
folder. (Source: https://docs.objectbox.io/getting-started in Dart Native tab.)But it’s odd, I thought Flutter would bundle this as part of the executable. If you want, feel free to open an issue (https://github.com/objectbox/objectbox-dart/issues) to discuss/analyze this further.