Gimp broken

On Ubuntu 20.04 I can’t start Gimp anymore. I get the following error message:

ln: failed to create symbolic link '/home/fkeclik/snap/gimp/273/.config/gtk-2.0/gtkfilechooser.ini': File exists
/snap/gimp/273/usr/bin/gimp: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory

When I want to remove gimp:

error: cannot perform the following tasks:
- Disconnect gimp:sound-themes from gtk-common-themes:sound-themes (cannot update mount namespace of snap "gimp": cannot update preserved namespace of snap "gimp": 
-----
update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0): invalid argument
cannot update snap namespace: no such file or directory
-----)

I tried to reproduce the failure on my machine but was unable to do so.

Can you please run this command and paste the output, that might help me understand what the problem is:

snap version

snap connections gimp

Thanks for looking into it!

snap version returns:

snap    2.45
snapd   2.45
series  16
ubuntu  20.04
kernel  5.4.0-24-generic

and snap connections gimp:

Interface                 Plug                  Slot                              Notes
content[gnome-3-28-1804]  gimp:gnome-3-28-1804  gnome-3-28-1804:gnome-3-28-1804   -
content[gtk-2-engines]    gimp:gtk-2-engines    gtk2-common-themes:gtk-2-engines  -
content[gtk-3-themes]     gimp:gtk-3-themes     gtk-common-themes:gtk-3-themes    -
content[icon-themes]      gimp:icon-themes      gtk-common-themes:icon-themes     -
content[sound-themes]     gimp:sound-themes     gtk-common-themes:sound-themes    -
cups-control              gimp:cups-control     -                                 -
dbus                      -                     gimp:dbus-gimp                    -
desktop                   gimp:desktop          :desktop                          -
desktop-legacy            gimp:desktop-legacy   :desktop-legacy                   -
gsettings                 gimp:gsettings        :gsettings                        -
home                      gimp:home             :home                             -
network                   gimp:network          :network                          -
opengl                    gimp:opengl           :opengl                           -
removable-media           gimp:removable-media  -                                 -
unity7                    gimp:unity7           :unity7                           -
wayland                   gimp:wayland          :wayland                          -
x11                       gimp:x11              :x11                              -

So far this looks identical.

Can you please try this:

sudo /usr/lib/snapd/snap-discard-ns gimp
snap run gimp

You can also remove ~/snap/gimp in case some state there is making the application fail to start.

snap-discard-ns fixed it. Thank you!

Any idea why this happens?

Not immediately but … perhaps. Can you tell me two more things:

Please run snap changes and report on any refreshes that happened recently. Did core or snapd refresh?

Do you have snapd snap installed?

Yesterday core refreshed.

I don’t have snapd installed.

I think I know why this happens and ironically it’s something we just discussed as something to fix. Thank you! If it happens the next time you know what to do. I will try to get it fixed in the next two releases.

2 Likes

Fyi, I saw this with the firefox snap yesterday as well. It was for a gtk3 library so I figured it had to do with the mount namespace and the content interface. snap-discard-ns fixed it (snap changes has since rotated those things away).

I ran the suggested commands and deleted directory. gimp runs fine, however, refresh does not.

❯ snap refresh 

error: cannot perform the following tasks:

  • Setup snap “core” (9665) security profiles (cannot update mount namespace of snap “makemkv”: cannot update preserved namespace of snap “makemkv”:

update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0): invalid argument
update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/usr/share/fonts /usr/share/fonts none bind,ro 0 0): invalid argument
update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/usr/local/share/fonts /usr/local/share/fonts none bind,ro 0 0): invalid argument
cannot update snap namespace: no such file or directory
-----)

❯ snap changes
ID Status Spawn Ready Summary
120 Error today at 08:56 PDT today at 08:57 PDT Refresh “core” snap
121 Error today at 08:59 PDT today at 08:59 PDT Auto-refresh 4 snaps
122 Error today at 09:04 PDT today at 09:04 PDT Refresh “core” snap
123 Done today at 09:05 PDT today at 09:06 PDT Refresh “chromium” snap
124 Done today at 09:05 PDT today at 09:06 PDT Refresh “deja-dup” snap
125 Done today at 09:05 PDT today at 09:06 PDT Refresh “remmina” snap
126 Error today at 09:07 PDT today at 09:07 PDT Refresh “core” snap
127 Error today at 09:21 PDT today at 09:21 PDT Refresh snap “core”
128 Error today at 09:25 PDT today at 09:26 PDT Refresh snap “core”

You can try this:

snap disable makemkv
snap refresh
snap enable makemkv
1 Like

worked for me! thanks!