Vscode snap cant launch due to libc6 version in Core20

Hey everyone… I’m wondering if I’ve somehow mucked things up, or if there’s a real issue here or not. I have the snap for vscode installed:

bladernr@galactica:~/development/$ snap info code
name:      code
summary:   Code editing. Redefined.
publisher: Visual Studio Code (vscode✓)
<SNIP>                      
installed:          1e3c50d6            (214) 346MB classic

and that has a dependency on libs in core20:

bladernr@galactica:~/development/$ snap info core20
name:      core20
summary:   Snap runtime environment
publisher: Canonical✓
<SNIP>
installed:          20250822            (2682) 66MB base

at least I am assuming it does because it seems to need libc6 from core20 when launching, and I’m getting lib version errors from the version in Core20:

bladernr@galactica:~/development/$ code
/snap/code/214/usr/share/code/bin/../code: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0)

bladernr@galactica:~/development/$ strings /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6 |grep -i glibc|grep 2.3
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.30
glibc 2.31
GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9.18) stable release version 2.31.

so to me that looks like the vscode snap is expecting a version of glibc in Core20 that does not exist…

as an update, I removed the code snap and reinstalled it and now I get more error messaging:

bladernr@galactica:~/development/$ code
/snap/code/214/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0)
/snap/code/214/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0)
ERROR: /snap/code/214/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders exited abnormally with status 1
ERROR: /snap/code/214/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 1
/snap/code/214/usr/share/code/bin/../code: /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0)

Ignore me… turns out at some point in the past I had set LD_PRELOAD to point to libgtk3-nocsd.0

bladernr@galactica:~/development/$ echo $LD_PRELOAD 
/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0

to fix some annoying warning messages with a CLI tool I used. and forgot about it.

Clearing LD_PRELOAD resolved the problem and things work fine now.

So the issue is PEBKAC

1 Like