Some snap apps (namely discord and telegram-desktop), stopped opening when I turned my laptop on this morning (Fedora 31 64bit), and when opened from terminal discord shows this:
~/ discord
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/discord/109/usr/share/discord/Discord: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
and telegram-desktop shows this:
~/ telegram-desktop
WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement
/snap/telegram-desktop/1561/bin/telegram-desktop: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory
both packages are installed, and I’m a bit stumped after searching threads and forums for most of the morning, nothing I tried worked, reinstalling them, trying different versions of the libraries and then the apps, installing 32bit versions, and on and on. Any help, prompts, ideas, or just general rambling about what the issue could be is much appreciated.
TLDR: Snap apps giving “error while loading shared libraries” and “cannot open shared object file: No such file or directory” when opened. Packages that are missing are installed correctly, so I’m stumped.
2
Answers
The warning is not your issue.
The real problem is simply you miss some dependencies in your snaps: for some reason snap is not installing all the requiered depdencies, while it should.
In an Ubuntu I have telegram-desktop and it works fine and I did this check:
to list the actual snaps.
And next I did check all the interdependencies by looking at the connections with:
this on my Utbuntu machine yields:
next I have found that the library libQt5Widgets.so.5 you are missing is provided by kde-frameworks-5-core18
I don’t know if on fedora you could use:
to fix your missing dependency.
On the other side on Fedora and similar distros you could try to use flatpak instaead of snap: flatpak comes as default app-package manager for the Fedora family.
First you need to add flathub as a flatpak remote repository:
next you can search:
and next install the apps:
I tested this on a CentOS virtual machine (I dont’ have a fedora ready to test, but CentOS is close enough) and I got them both correctly working.
Hey I’m not an expert at all, but I’ve been facing the same issue, and it seems that doing a “snap refresh” fixed the problem on my ubuntu. I’m not sure if it’s relevant or not, but it might help