9

Since a few days both eog and gimp fail when launched from the command line. I get the same error message from both:

gimp: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

eog: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

This happens in all of the default terminal, x-terminal, and terminator. Snap says all packages are up to date. I'm at my wit's end. What else should I look at?

Thanks!

EDIT: gimp and eog aren't snap apps. Here is what snap list yields:

Name                            Version                     Rev    Tracking         Publisher    Notes
bare                            1.0                         5      latest/stable    canonical**  base
code                            7f329fe6                    123    latest/stable    vscode**     classic
core                            16-2.58.3                   14946  latest/stable    canonical**  core
core18                          20230320                    2721   latest/stable    canonical**  base
core20                          20230308                    1852   latest/stable    canonical**  base
core22                          20230325                    607    latest/stable    canonical**  base
firefox                         111.0.1-2                   2487   latest/stable/…  mozilla**    -
gnome-3-28-1804                 3.28.0-19-g98f9e67.98f9e67  194    latest/stable    canonical**  -
gnome-3-38-2004                 0+git.6f39565               137    latest/stable/…  canonical**  -
gnome-42-2204                   0+git.e7d97c7               68     latest/stable    canonical**  -
gtk-common-themes               0.1-81-g442e511             1535   latest/stable/…  canonical**  -
heroku                          v7.60.1                     4092   latest/stable    heroku**     classic
hunspell-dictionaries-1-7-2004  1.7-20.04+pkg-6fd6          2      latest/stable    brlin        -
snap-store                      41.3-66-gfe1e325            638    latest/stable/…  canonical**  -
snapd                           2.58.3                      18596  latest/stable    canonical**  snapd
snapd-desktop-integration       0.1                         57     latest/stable/…  canonical**  -
spotify                         1.2.8.923.g4f94bf0d         63     latest/stable    spotify**    -

EDIT2:

alhq@al-ubuntu:~/Desktop$ which gimp
/usr/bin/gimp
alhq@al-ubuntu:~/Desktop$ which eog
/usr/bin/eog

1 Answers1

13

I had also raised this issue in VSCode here

As pointed out in one of the comments to install gtk-4 libraries resolved it for him.

For me it was already installed after inspecting the VSCode terminal environment for a bit I narrowed it down to the following environment variable being set in the snap based VSCode installation:

  • GTK_PATH

After unsetting the environment variable in the VSCode terminal:

unset GTK_PATH

I was able to execute GUI apps from the VSCode terminal.

Till the time the actual fix comes in VSCode, this can be used temporarily to work around this issue.

As a slightly more permanent workaround, you can also unset GTK_PATH in your VS Code user settings, run "Preferences: Open User Settings (JSON)" and add this to your settings.json:

    "terminal.integrated.env.linux": {
        "GTK_PATH": ""
    }

Update 2: 2024-04-05

It seems the VSCode Snap package(version 1.87.1) has introduced even more environment variables for GTK Toolkit.

I have to additionally unset the following environment variables for additional GTK Built Applications:

unset GIO_MODULE_DIR

For people looking at solving this issue with the VSCode Snap Package installation can use the following in their settings.json:

"terminal.integrated.env.linux": {
    "GTK_PATH": null,
    "GIO_MODULE_DIR": null,
},
AmeyaVS
  • 596
  • 5
  • 15