Search code examples
linuxflutterubuntulibcgvfs

GLIBC_2.33 not found - while building Flutter for Linux


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.


Solution

  • It's a snap problem with vscode. First remove vscode :

    sudo snap remove code
    

    Then download the .deb of vscode here : https://code.visualstudio.com/docs/setup/linux

    And install it with :

    sudo apt install ./<file>.deb