Two Ubuntu software applications [duplicate]

I am trying to open snap-store and it is not opening. This seems to be a problem for opening .deb packages as well.

I get this response when I try to open it on a terminal with sudo snap-store:

mkdir: cannot create directory '/run/user/0': Permission denied
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”.  Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
/snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: symbol lookup error: /snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: atk_plug_set_child
ERROR: /snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
/snap/snap-store/518/usr/bin/snap-store: symbol lookup error: /snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: atk_plug_set_child

I've tried removing and reinstalling snap-store, but that didn't help. Snap version is 2.50.1 (if that helps). If you need any information I will provide it. I don't know how to solve this and nothing I've found online has been helpful.

I also saw a post where someone said they solved what looked like a similar error by looking at the output of ldd /usr/bin/gedit, but I have no idea what it's about. Here's the output for that though:

linux-vdso.so.1 (0x00007ffe043ec000)
libgedit-3.36.so => /usr/lib/x86_64-linux-gnu/gedit/libgedit-3.36.so (0x00007f1471f26000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f1471ea4000)
libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f1471cc3000)
libtepl-4.so.0 => /lib/x86_64-linux-gnu/libtepl-4.so.0 (0x00007f1471c89000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1471a97000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f147196e000)
libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f14711bb000)
libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007f14710b6000)
libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f1471067000)
libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f147103d000)
libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f1470f1a000)
libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f1470ef2000)
libgtksourceview-4.so.0 => /lib/x86_64-linux-gnu/libgtksourceview-4.so.0 (0x00007f1470e51000)
libamtk-5.so.0 => /lib/x86_64-linux-gnu/libamtk-5.so.0 (0x00007f1470e3f000)
libgirepository-1.0.so.1 => /lib/x86_64-linux-gnu/libgirepository-1.0.so.1 (0x00007f1470e07000)
libpeas-1.0.so.0 => /lib/x86_64-linux-gnu/libpeas-1.0.so.0 (0x00007f1470ded000)
libpeas-gtk-1.0.so.0 => /lib/x86_64-linux-gnu/libpeas-gtk-1.0.so.0 (0x00007f1470ddc000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1470c9f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1470b4e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1470b2b000)
libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f1470b1f000)
libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f1470b19000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1470afd000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1470af7000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f1470a95000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f1470a6a000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f1470a4e000)
libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f1470894000)
libuchardet.so.0 => /lib/x86_64-linux-gnu/libuchardet.so.0 (0x00007f147086f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1472019000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f14707fc000)
libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f14707e8000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007f14707d6000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f14707ce000)
libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007f14707c2000)
libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007f147078b000)
libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007f1470658000)
libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f1470639000)
libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f1470620000)
libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f147051b000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f14704d4000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f1470415000)
libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f147040e000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f1470401000)
libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f14703f4000)
libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f14703ef000)
libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f14703ea000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f14703a8000)
libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f147039d000)
libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f1470396000)
libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f1470385000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1470370000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1470365000)
libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007f147035a000)
libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f14702b1000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f1470279000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f1470274000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f147024a000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f147023b000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f1470031000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f146ffd8000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f146ff48000)
libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007f146fd62000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f146fd39000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f146fb58000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f146fb3b000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f146faea000)
libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007f146fab3000)
libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f146fa86000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f146fa58000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f146fa4d000)
libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f146fa43000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f146fa3d000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f146fa35000)
libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007f146df74000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f146dec3000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f146dea9000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f146de88000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f146dd6a000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f146dd47000)

The problem is in the internals of the latest snap-store version 3.38.0-59-g494f078 2021-04-20 (518) from default channel.
To fix it you can upgrade it to newer version by using command below

snap refresh snap-store --beta --ignore-running

Then you can use it as before.


Notes:

  1. this method is universal for all current Ubuntu releases - 18.04 LTS, 20.04 LTS, 20.10 and 21.04.
  2. we need to get official fix from Snap Store developers and switch then to default channel, bug 1931380 was reported to launchpad.
  3. if one is not happy with above solution, then one can use GNOME Software with snap plugin instead - sudo add-apt-repository universe; sudo apt-get update; sudo apt-get install gnome-software gnome-software-plugin-snap .

Update: The bug has been fixed. If you switched to the beta channel, you should switch back to stable with the following command:

snap refresh snap-store --stable

From the information in the bug report, a beta version with fix is already available. It can be installed with:

snap refresh snap-store --beta --ignore-running

Tried it, works.