启动 Snap Store 时出错

启动 Snap Store 时出错

当我尝试在终端上不带 sudo 运行新安装的 20.04 LTS 版本上的 Snap 商店时,出现了以下错误:

~$ snap-store
05:52:04:0142 Gs  enabled plugins: odrs, rewrite-resource, snap, icons, key-colors, key-colors-metadata05:52:04:0142 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
05:52:04:0375 Gs  failed to create an app for */*/*/*/system/*
05:52:04:0377 Gs  updates-shell: failed to get updates: no plugin could handle get-updates
05:52:04:0378 Gs  failed to create an app for */*/*/*/system/*
05:52:04:0378 Gs  failed to get system app
05:52:04:0378 Gs  Only 0 apps for recent list, hiding
05:52:05:0184 Gs  hiding category audio-video featured applications: found only 0 to show, need at least 9
05:52:05:0184 Gs  hiding category productivity featured applications: found only 0 to show, need at least 9
05:52:05:0253 GsPluginSnap Failed to load snap icon: local snap has no icon
05:52:05:0818 GsPluginSnap Failed to load snap icon: local snap has no icon
05:52:06:0419 GsPluginSnap Failed to load snap icon: local snap has no icon

如果我使用 Sudo 则会出现这些错误

mkdir: cannot create directory '/run/user/0': Permission denied
05:58:51:0429 GLib-GIO g_app_info_get_name: assertion 'G_IS_APP_INFO (appinfo)' failed
No protocol specified
Unable to init server: Could not connect: Connection refused
05:58:51:0432 Gtk cannot open display: :0

我该如何解决这些问题?

谢谢

答案1

  1. 在 Ubuntu 20.04 中安装软件应用程序sudo apt install gnome-software

  2. 在软件应用程序中搜索 Snap Store,单击 Snap Store 转到 Snap Store 屏幕,然后单击按钮 Launch 从软件应用程序启动它。

  3. 打开 Snap Store 后,它会在 GUI 中提示您获取所需的更新。如果您需要使用密码进行身份验证才能更新 Snap Store,您还会收到一个弹出身份验证窗口。

  4. 通过搜索具有 gedit 或 emacs 等 snap 包的应用程序来检查 Snap Store 是否正常工作。

相关内容