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
  • 2
    I would go ahead and install the non snap versions, ... and remove snap all together, but that might just be me. alternatively, you might try purging and reinstalling EOG, and Gimp. – j0h Apr 04 '23 at 18:17
  • 2
    Thanks @j0h . Gimp and eog aren't even snap apps. I added all the snap apps I have in my original post. – LearnDude Apr 05 '23 at 02:13
  • show us the output of which gimp also, if you happen to call gimp directly from its location it might be: /usr/bin/gimp it would seem something is telling snap to run gimp, but the snap version is not present. – j0h Apr 05 '23 at 16:21
  • It is as you said - they seem to be in the right place: /usr/bin/gimp, /usr/bin/eog – LearnDude Apr 05 '23 at 20:35

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