无法联系到Snap Store

我昨天安装了Ubuntu 18.04。今天我尝试通过snap安装micro编辑器,但它无法工作。任何类似这样的命令sudo snap install hello-world都会冻结一分钟,然后我收到以下错误信息:

error: 无法联系到snap store

snap store有问题还是因为我无法从我的网络连接到它?我该如何检查呢?

刚刚自己弄到了这个。我能够ping通Google并登录Snap,但是在查找和安装时出现了错误。 - Eric Fossum
看起来他们的服务器出了些问题。他们的网站此刻也非常不稳定。 - BlueManCZ
看起来现在好像可以了(我也遇到了同样的错误)-建议再试一次! - lightningmanic
3这可能会有帮助:https://status.snapcraft.io/ - cortex
4个回答

似乎今天早上 Snap Store 有些问题。偶尔会成功返回。
➜  ~ sudo snap find nextcloud
Name                Version           Developer     Notes  Summary
nextcloud-client    2.3.3+gitab40efe  nextcloud     -      Nextcloud Desktop Client
nextcloud-port8080  1.01              arcticslyfox  -      Nextcloud Server
nextcloud-nextant   11.0.0snap3       rmescandon    -      Nextcloud Server + search support
nextcloud           13.0.2snap1       nextcloud     -      Nextcloud Server - A safe home for all your data
cashbox-nextcloud   11.0.2snap2       cashbox       -      Nextcloud Server for www.cashBOX.plus
qownnotes           18.05.2           pbek          -      Plain-text file notepad with markdown support and ownCloud / Nextcloud integration
spreedme            0.29.5snap1       nextcloud     -      Spreed.ME audio/video calls and conferences feature for the Nextcloud Snap
solr                0.1               rmescandon    -      Starts up solr as forking daemon
mdns-hostname       0.0.1             welike        -      mDNS mini-daemon to published hostname.local
➜  ~ sudo snap find nextcloud
error: unable to contact snap store
➜  ~ 

我从几个月前开始一直收到“错误:无法联系到Snap Store”的提示,无论我创建的是哪个Linux虚拟机。我猜这不仅仅是一个Snap Store的问题。 - apaderno

我刚才也遇到了同样的错误。对我有效的解决方案是:
在终端中执行以下操作:
$ killall snap-store

然后,快速连接又恢复了。

当你在代理后面尝试通过snap安装某个东西时,可能会遇到这个错误。
使用以下命令配置代理:
sudo snap set system proxy.http="http://<proxy_addr>:<proxy_port>"
sudo snap set system proxy.https="http://<proxy_addr>:<proxy_port>"

Snap store可能只是暂时关闭了。太糟糕了,这让人感到困扰。根据我看到的一个解决方案,刷新snapd应该可以解决这个问题(?),但是由于Web API出现故障,它并不起作用。我不知道API规范是否发生了变化,但目前情况是主机无法解析。你必须等待商店恢复正常。附注:在我的情况下,可能有一个服务器更改需要一些时间来传播。
$ sudo snap refresh snapd

error: cannot refresh "snapd": cannot refresh snap-declaration for "chromium":
       Get
       https://api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R?max-format=4:
       dial tcp: lookup api.snapcraft.io on 127.0.0.53:53: no such host
$ host api.snapcraft.io
;; connection timed out; no servers could be reached