为了释放磁盘空间,我愚蠢地运行了以下命令sudo apt purge snapd
。现在 Firefox 等一大堆应用程序都无法正常工作:
firefox &
...
Command '/usr/bin/firefox' requires the firefox snap to be installed.
Please install it with:
snap install firefox
但当我尝试安装时系统报告 Firefox 已安装
sudo snap install firefox
snap "firefox" is already installed, see 'snap help refresh'
我认为 Snap 的问题更大,因为我使用 Skype 时也遇到了同样的问题
$skype &
cannot locate base snap core18: No such file or directory
$ sudo snap install skype
snap "skype" is already installed, see 'snap help refresh'
您必须重新安装 snapd。
sudo apt install snapd
应该可以解决这个问题。如果没有 Snap,Snap 就无法运行snapd
,但由于它们是两个独立的软件包系统,apt 无法识别 Snap,因此当您删除 时它们不会被清除snapd
。问题是 snapd 的卸载从未完全成功。
因此,经过一番谷歌搜索后,我发现了这个建议卸载 hunspell
在此之后我终于成功了我现在可以重新安装 snapd 和 firefox