我正在尝试通过 snap 安装 Rocket Chat 服务器。当我尝试执行:
sudo snap install rocketchat-server
我收到以下错误:
error: cannot communicate with server:
Post http://localhost/v2/snaps/rocketchat-server:
dial unix /run/snapd/socket: connect: connection refused
当我尝试列出快照或任何其他相关命令时,我遇到了同样的错误。有什么想法吗?
以下是输出journalctl -u snapd.service
systemd[1]: Started Snappy daemon.
/usr/lib/snapd/snapd[6186]: patch.go:65: Patching system state from level 3 to 4
snapd[6186]: 2017/01/18 18:31:48.253833 patch.go:65: Patching system state from level 3 to 4
usr/lib/snapd/snapd[6186]: patch.go:72: Cannot patch: cannot get snap state from "rocket-server": <nil>
snapd[6186]: 2017/01/18 18:31:48.267963 patch.go:72 Cannot patch: cannot get snap state from "rocket-server": <nil>
snapd[6186]: error: cannot patch system state from level 3 to 4: cannot get snap state for "rocketchat-server": <nil>
snapd.service: Main process exited, code=exited, status=1/FAILURE
snapd.service: Unit entered failed state.
snapd.service: Failed with result 'exit-code'
snapd.service: Service hold-off time over, scheduling restart.
snapd.service: Stopped Snappy daemon.
答案1
只需尝试重新启动 snap 服务。
sudo systemctl restart snapd.service
snapd
如果更新不起作用,它很可能会解决
答案2
也许你的 snapd 版本有问题。只需升级活泼的。
sudo apt update
sudo apt install snapd
答案3
我是上游 snapd 开发人员。让我看看你看到的错误。
你使用的是哪个版本的 snapd?
编辑:我刚刚与其他开发人员交谈过,似乎在 2.21 版本发布之前,您运气不佳。您能否尝试使用 snapd 版本(如果解决了您的问题,请报告)。