Merrit / flutter_flatpak_example

An example of how to package a Flutter application as a Flatpak for distribution on Linux, using the default counter example app.
64 stars 8 forks source link

Error while launching the app #1

Closed ferraridamiano closed 2 years ago

ferraridamiano commented 2 years ago

Hi, and thank for this tutorial! I followed your steps on multiple machines (even with different distros) But when I try to install the app with

flatpak-builder --user --install --force-clean build-dir com.example.FlutterApp.json

and then launching it with flatpak run com.example.FlutterApp

I get the following error:

FlutterApp: /usr/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.34' not found (required by FlutterApp)

Merrit commented 2 years ago

I believe this is due to a glibc version conflict with the flatpak because of where the build was done.

To make sure this doesn't happen it seems best to do inside a container. I created a GitHub workflow to demonstrate - if you fork (or update) the repo, you can run this workflow and install the generated .flatpak file with flapak install <path-to-.flatpak> -- I tried this and it worked well for me. Hope that helps :+1:

ferraridamiano commented 2 years ago

Thank you very much @Merrit ! I solved by building the app on a different environment.

I just submitted my first app to flathub 🤞

Merrit commented 2 years ago

Nice! Glad it worked out for you :tada: