Score:0

Snap-store cannot create directory ‘/run/user/0’

kr flag

22.04 LTS After some updates:

sudo apt-get update
sudo apt-get upgrade

I am not able to open snap-store:

sudo snap-store
mkdir: cannot create directory ‘/run/user/0’: Permission denied
Bus error

Some logs from my journalctl -xe:

Aug 02 00:59:33  audit[4759]: AVC apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19457/usr/lib/snapd/snap-confine" pid=4759 comm="s>
Aug 02 00:59:33  kernel: audit: type=1400 audit(1690927173.374:81): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19457/usr/lib/sn>
Aug 02 00:59:33  audit[4759]: AVC apparmor="DENIED" operation="capable" class="cap" profile="snap.snap-store.snap-store" pid=4759 comm="desktop-launch" cap>
Aug 02 00:59:33  audit[4782]: AVC apparmor="DENIED" operation="capable" class="cap" profile="snap.snap-store.snap-store" pid=4782 comm="desktop-launch" cap>
Aug 02 00:59:33  kernel: audit: type=1400 audit(1690927173.382:82): apparmor="DENIED" operation="capable" class="cap" profile="snap.snap-store.snap-store" >
Aug 02 00:59:33  kernel: audit: type=1400 audit(1690927173.382:83): apparmor="DENIED" operation="capable" class="cap" profile="snap.snap-store.snap-store" >
Aug 02 00:59:33  audit[4799]: AVC apparmor="DENIED" operation="mkdir" class="file" profile="snap.snap-store.snap-store" name="/run/user/0/" pid=4799 comm=">
Aug 02 00:59:33  kernel: audit: type=1400 audit(1690927173.418:84): apparmor="DENIED" operation="mkdir" class="file" profile="snap.snap-store.snap-store" n>
Aug 02 00:59:33  kernel: SQUASHFS error: lzo decompression failed, data probably corrupt
Aug 02 00:59:33  kernel: SQUASHFS error: Failed to read block 0xe29b5d5: -5
Aug 02 00:59:33  kernel: SQUASHFS error: lzo decompression failed, data probably corrupt
Aug 02 00:59:33  kernel: SQUASHFS error: Failed to read block 0xe29b5d5: -5
Aug 02 00:59:33  systemd[1]: snap.snap-store.snap-store.e9cef43a-2cc9-42f6-a39e-f8f22d3f1bc9.scope: Deactivated successfully.

Any thoughts? Thanks

noisefloor avatar
ec flag
First, there is absolutely no need to run the snap-store as root using sudo. Does it start when opening it over the graphical menu or when calling `snap-store` from the terminal? Do other snaps, e.g. Firefox, run normal?
eSensitive avatar
kr flag
@noisefloor thanks for your attention. The reason why I ran snap-store as root to get more logs printed. When I run it from terminal I get just: Bus error (core dumped). With the graphical menu I can see only a running spin for while and nothing happens next. I can run FireFox correctly without any issues.
eSensitive avatar
kr flag
The issue might be related to nvidia drivers and CUDA toolkit package which I installed previously.
noisefloor avatar
ec flag
What you could try is to revert to an older version of the snap-store snap. Run `snal list --all` from the terminal. You should see min two entries for the snap-store snap with the revision of the snap shown in the `rev` column of the output. Then run `sudo snap revert snap-store`. This will revert the snap-store to the previous version. Try if this works.
eSensitive avatar
kr flag
@noisefloor, indeed, there are 2 versions of snap store. `snap-store 41.3-71-g709398e snap-store 41.3-66-gfe1e325` when I reverted to the oldest one I get the following: [Failed to load module: ~/snap/snap-store/common/.cache/gio-modules/libdconfsettings.so 12:47:01:0830 Gtk Failed to load module "canberra-gtk-module" 12:47:01:0832 Gtk Failed to load module "canberra-gtk-module" 12:47:02:0014 Gs /etc/PackageKit/Vendor.conf file not found 12:47:02:0204 Gtk Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. Gtk:ERROR]
noisefloor avatar
ec flag
You could try to remove the snap-store completely and reinstall. Technically, the system will work fine with no Snap Store installed (assuming you are confident installing snaps via the terminal, which is IMHO the more convenient method anyway. To do so, run `sudo snap remove snap-store`, then navigate into the 'snap' directory in you home folder, run `rm -r snap-store` there and then reinstall: `sudo snap install snap-store`. In case the error remains, the problem may be not related to the Snap Store snap itself.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.