I was trying to run a flutter app on Ubuntu 22.04 LTS. Everything was working fine. But, today this problem came up while running the app. The Flutter SDK fails to build the app throwing the below error.
/snap/flutter/130/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/../../../../lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
After searching on the internet I realized I need a backward version of libc. If I do file /snap/flutter/130/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/../../../../lib/x86_64-linux-gnu/libc.so.6
.
I get the result /snap/flutter/130/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/../../../../lib/x86_64-linux-gnu/libc.so.6: symbolic link to libc-2.31.so
.
Probably I need to install libc-2.31. But, how? I did not find any solution. Both Flutter and Ubuntu are upgraded to the latest versions.
4
Answers
No, you don’t.
The error means: the version of GLIBC you are using is too old and does not satisfy requirements of the system
libgvfsdbus.so
which you are trying to load.Your application appears to be using a custom version of GLIBC, located in
/snap/flutter/130/lib/x86_64-linux-gnu/libc.so.6
, which is older than the system-installed GLIBC (which is likely 2.33 or newer).I don’t know whether Flutter makes you use a custom GLIBC, or whether you chose to do so on your own. Either way, this seems like a terrible idea.
If you must use custom GLIBC for this app, then you should not use any system libraries (such as
/usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
) in it.snap refresh flutter --edge
flutter upgrade
rm -r build/
flutter run -d linux
reference this
It’s a snap problem with vscode.
First remove vscode :
Then download the .deb of vscode here : https://code.visualstudio.com/docs/setup/linux
And install it with :
I had this problem. I just uninstalled and reinstalled flutter. It worked nice.