我正在尝试使用 snap 安装 snapd sudo snap install snapd
,但出现以下错误。
error: cannot communicate with server: Post "http://localhost/v2/snaps/snapd": dial unix /run/snapd.socket: connect: connection refused
我已经尝试多次启用 snapd 服务,当我运行时,systemctl status snapd
这就是我得到的。
Loaded: loaded (/usr/lib/systemd/system/snapd.service; enabled; preset: disabled)
Active: inactive (dead) since Thu 2023-03-30 11:16:08 EDT; 5min ago
Duration: 5.012s
TriggeredBy: ● snapd.socket
Process: 42619 ExecStart=/usr/lib/snapd/snapd (code=exited, status=42)
Main PID: 42619 (code=exited, status=42)
CPU: 77ms
它表明它自 5 分钟前就处于非活动状态,那是我最后一次运行sudo systemctl start snapd.service
。我无法弄清楚为什么它不活动,我还运行sudo systemctl enable snapd.service
以创建符号链接,但我现在无法从 snap 下载任何内容。我收到以下错误
error: cannot communicate with server: Post "http://localhost/v2/snaps/snapd": dial unix /run/snapd.socket: connect: no such file or directory
显然守护进程不活跃,但我无法弄清楚如何在不立即进入非活动状态的情况下保持它的运行。