我正在运行几个随 Snap Store 安装的应用程序。我有一段时间没有使用系统,盲目运行
sudo apt-get update
sudo apt-get upgrade
sudo snap refresh
重新启动后bdzionk。当我启动任何这些应用程序甚至快照存储本身时,它都会默默地完成。其他一切都按预期进行。
为了更好地诊断问题,我尝试使用命令行启动应用程序:
pdebski@system:~$ ps -ea | grep snap
764 ? 00:00:01 snapd
pdebski@system:~$ snap list
Name Version Rev Tracking Publisher Notes
chromium 83.0.4103.61 1165 latest/stable canonical✓ -
core 16-2.45 9289 latest/stable canonical✓ core
core18 20200427 1754 latest/stable canonical✓ base
gnome-3-28-1804 3.28.0-17-gde3d74c.de3d74c 128 latest/stable canonical✓ -
gtk-common-themes 0.1-36-gc75f853 1506 latest/stable canonical✓ -
kde-frameworks-5-core18 5.61.0 32 latest/stable kde✓ -
midori v8.0-31-gf6b3b1e 550 latest/stable kalikiana -
snap-store 3.31.1+git187.84b64e0b 415 latest/stable canonical✓ -
snapd 2.45 7777 latest/stable canonical✓ snapd
pdebski@system:~$ snap run snap-store
/snap/snap-store/415/bin/desktop-launch: line 51: /home/pdebski/.config/user-dirs.dirs: Permission denied
18:13:30:0737 GLib-GIO g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed
18:13:30:0740 Gtk Failed to load module "appmenu-gtk-module"
Unable to init server: Could not connect: Connection refused
18:13:30:0746 Gtk cannot open display: :1
pdebski@system:~$ ls -l .co*/u*s
-rw------- 1 pdebski pdebski 632 mar 21 2018 .config/user-dirs.dirs
我不希望user-dirs.dirs
我的主目录中的文件或任何其他文件可供世界读取,但我更改了权限以检查发生的情况:
pdebski@system:~/.config$ chmod go+r u*s
pdebski@system:~/.config$ ls -ld .
drwxr-xr-x 27 pdebski pdebski 4096 cze 5 19:52 .
pdebski@system:~/.config$ ls -al u*
-rw-r--r-- 1 pdebski pdebski 632 mar 21 2018 user-dirs.dirs
pdebski@system:~/.config$ ls -ald ../.c*g
drwxr-xr-x 27 pdebski pdebski 4096 cze 5 19:52 ../.config
pdebski@system:~/.config$ snap-store
/snap/snap-store/415/bin/desktop-launch: line 51: /home/pdebski/.config/user-dirs.dirs: Permission denied
20:45:44:0906 GLib-GIO g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed
20:45:44:0951 Gtk Failed to load module "appmenu-gtk-module"
Unable to init server: Could not connect: Connection refused
20:45:45:0012 Gtk cannot open display: :1
我被困住了。怎么了?
答案1
我有 manjaro,但这个问题已经出现过好几次了,快速的快照商店重新安装解决了这个问题(尝试按照他们的说明进行操作)https://snapcraft.io/snap-store)
现在我有矩形而不是文本字符,我可以通过以下方式解决:
sudo rm /var/cache/fontconfig/*
sudo rm ~/.cache/fontconfig/*
答案2
谢谢@borabora,重新安装 snap-store 确实有帮助:
$ snap help
The snap command lets you install, configure, refresh and remove snaps.
Snaps are packages that work across many different Linux distributions,
enabling secure delivery and operation of the latest apps and utilities.
Usage: snap <command> [<options>...]
Commands can be classified as follows:
Basics: find, info, install, list, remove
...more: refresh, revert, switch, disable, enable
History: changes, tasks, abort, watch
Daemons: services, start, stop, restart, logs
Commands: alias, aliases, unalias, prefer
Configuration: get, set, unset, wait
Account: login, logout, whoami
Permissions: connections, interface, connect, disconnect
Snapshots: saved, save, check-snapshot, restore, forget
Other: version, warnings, okay, ack, known, model, create-cohort
Development: run, pack, try, download, prepare-image
For more information about a command, run 'snap help <command>'.
For a short summary of all commands, run 'snap help --all'.
$ snap refresh snap-store
snap "snap-store" has no updates available
$ snap remove snap-store
snap-store removed
$ snap install snap-store
snap-store 3.31.1+git187.84b64e0b from Canonical✓ installed
$ snap-store
21:58:29:0941 Gtk Failed to load module "appmenu-gtk-module"
21:58:30:0253 GsPluginOdrs failed to get distro name: Failed to open file “/var/lib/snapd/hostfs/etc/os-release”: Permission denied
21:58:30:0287 Gs enabled plugins: odrs, rewrite-resource, snap, icons, key-colors, key-colors-metadata
21:58:30:0288 Gs disabled plugins: appstream, desktop-categories, desktop-menu-path, dpkg, dummy, epiphany, fedora-pkgdb-collections, generic-updates, hardcoded-blacklist, hardcoded-featured, hardcoded-popular, modalias, os-release, provenance, provenance-license, repos, shell-extensions
21:58:34:0513 Gs failed to create an app for */*/*/*/system/*
21:58:34:0516 Gs updates-shell: failed to get updates: no plugin could handle get-updates
21:58:34:0516 Gs failed to create an app for */*/*/*/system/*
21:58:34:0516 Gs failed to get system app
21:58:34:0541 GsPluginSnap Failed to load snap icon: local snap has no icon
21:58:34:0552 Gs Only 0 apps for recent list, hiding
21:58:34:0565 Gs hiding category graphics featured applications: found only 0 to show, need at least 9
21:58:34:0777 Gs hiding category audio-video featured applications: found only 0 to show, need at least 9
21:58:35:0147 GsPluginSnap Failed to load snap icon: local snap has no icon
21:58:35:0350 GsPluginSnap Failed to load snap icon: local snap has no icon
21:58:35:0767 GsPluginSnap Failed to load snap icon: local snap has no icon
(出现快照存储窗口)
请注意不同的错误消息 - 显然快照存储质量需要更多改进。
可能在系统更新期间内核或某些库被更新,这破坏了兼容性。无需重新安装其他 Snap 应用程序。仅重新安装商店会自动修复所有其他应用程序的先决条件。
答案3
答案4
重新配置 snapd 对我有用:
sudo dpkg-reconfigure snapd