今天在kali里面需要使用snap安装httpie工具,然后发现有如下错误
[email protected]:~/tutorial$ sudo snap install core
[sudo] password for kali:
error: cannot communicate with server: Post "http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect: no such file or directory
error: cannot communicate with server: Post "http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect: no such file or directory
出现上述错误
然后查找原因,可能是因为刚刚安装snap,没有启动服务,具体参考后面网址。
做如下操作:
#启动snapd服务
service snapd start
sudo systemctl start snapd.service
再次使用snap工具安装httpie
[email protected]:~/tutorial$ sudo snap install core
2021-06-22T15:52:40+08:00 INFO Waiting for automatic snapd restart...
core 16-2.51 from Canonical✓ installed
成功实现安装,解决问题!
参考:
1、https://stackoverflow.com/questions/59545217/how-do-i-fix-the-snapd-socket-no-such-file-or-directory-error-on-mxlinux