我想安装 intellij idea。我试过:
sudo snap install intellij-idea-community --classic
[sudo] password for user-1099869:
error: cannot communicate with server:
Post http://localhost/v2/snaps/intellij-idea-community:
dial unixtr /run/snapd.socket: connect: no such file or directory
我之前发布过有关此问题的帖子并被告知重新安装 snapd。
我做到了
sudo apt autoremove --purge snapd
然后
$ sudo apt update
$ sudo apt install snapd
我测试了 hello world snapd。得到了和以前一样的错误:
error: cannot communicate with server:
Post http://localhost/v2/snaps/hello-world:
dial unix /run/snapd.socket: connect: no such file or directory
如果我尝试
snap version
它删除了“user-10998699@localhost”并允许我输入任何内容,甚至是新行,同样的情况也发生在
snap list
有人问这是否真的是 Ubuntu 16.04。我在 chromebook 上安装了 Crouton。https://www.howtogeek.com/162120/how-to-install-ubuntu-linux-on-your-chromebook-with-crouton/
更新(2021 年 2 月 18 日):
systemctl start snapd.socket
得到我:
Failed to add /run/systemd/ask-password to directory watch:
No such file or directory
Failed to start snapd.socket: Launch helper exited with unknown return
code 1
See system logs and 'systemctl status snapd.socket' for details.
我愿意
systemctl status snapd.socket
得到:
Failed to get properties: Launch helper exited with unknown return code 1
我试过:
sudo service snapd start
得到:
snapd: unrecognized service
我做到了:
sudo systemctl unmask snapd.service
sudo systemctl enable snapd.service
似乎有效
然后
systemctl 启动 snapd.socket
并得到
Running in chroot, ignoring request.
答案1
您没有运行快照服务。
一旦您安装了 snap ( sudo apt install snapd
),您就仅仅安装了 snap,您还没有做任何事情来运行它,或者让它在您的计算机启动时自动启动。
您还想执行以下操作:
systemctl start snapd.socket
- 运行 snap,以便您可以执行命令。
systemctl enable snapd.socket
- 在启动时运行 snap。
我刚刚通过停止snapd.socket
自己(systemctl stop snapd.socket
)进行了测试,当服务停止时,我遇到了与您描述的类似的行为。