如何删除/重新安装 core18 snap?

如何删除/重新安装 core18 snap?

Snap 丢失。我想重新安装,但似乎无法先移除它们才能重新安装。我该如何修复?

$ chromium-browser
cannot locate base snap core18: No such file or directory

$ snap list
Name                  Version                     Rev    Tracking         Publisher    Notes
chromium              87.0.4280.88                1421   latest/stable    canonical✓   -
core                  16-2.48                     10444  latest/stable    canonical✓   core
core18                20200929                    1932   latest/stable    canonical✓   base
gnome-3-26-1604       3.26.0.20200529             100    latest/stable/…  canonical✓   -
gnome-3-28-1804       3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical✓   -
gnome-3-34-1804       0+git.3556cb3               60     latest/stable    canonical✓   -
gnome-system-monitor  3.36.0-12-g35f88a56d7       148    latest/stable/…  canonical✓   -
gtk-common-themes     0.1-50-gf7627e4             1514   latest/stable/…  canonical✓   -
snap-store            3.38.0-55-geb45541          498    latest/stable/…  canonical✓   -

$ sudo snap install core18
snap "core18" is already installed, see 'snap help refresh'

$ sudo snap remove core18
error: cannot remove "core18": snap "core18" is not removable: snap is being used by snaps
       chromium, gnome-3-28-1804, gnome-3-34-1804, gnome-system-monitor and 2 more.

$ snap version
snap    2.48+20.04
snapd   2.48+20.04
series  16
ubuntu  20.04
kernel  5.4.0-56-generic

答案1

你可以刷新如果您遇到类似以下错误

snap "core18" has no updates available

您可以通过暂时切换到边缘跟踪分支来强制刷新

snap refresh core18 --edge

然后,当问题解决后,将其切换回稳定的跟踪分支

snap refresh core18 --stable

答案2

删除所有依赖项允许删除 core18,然后重新安装。这并不像我想象的那么混乱。

2020 年 2 月 29 日之后的 Chromium 配置丢失了。我特意备份了 ~/.config/chromium,但该目录似乎只包含截至该日期的配置。

答案3

清爽可能有帮助:

sudo snap refresh core18

snap help refresh

刷新命令将更新指定的快照,如果未指定,则更新系统中的所有快照。

相关内容