Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load dynamic library #455

Open
emersonsiega opened this issue Oct 13, 2024 · 1 comment
Open

Failed to load dynamic library #455

emersonsiega opened this issue Oct 13, 2024 · 1 comment

Comments

@emersonsiega
Copy link

I'm trying to use a custom native library, lets say "mylib.so".
I can run the Flutter app and/or build to native without any problem.

After build with flutter-pi and run in a raspberry pi 3 board, the app cannot find the library.

> flutter-pi --release /home/pi/app
> flutter: Invalid argument(s): Failed to load dynamic library 'mylib.so': mylib.so: cannot open shared file: No such file or directory

How can I build and run the app with custom libraries?

*I have tried to move this library to /usr/local/lib and /usr/lib, but didn't solve..

@pezi
Copy link

pezi commented Nov 2, 2024

Check if LD_LIBRARY_PATH is empty for your env?
If yes,
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
befor calling flutter_pi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants