我在 Raspberry Pi 3 上安装了 Ubuntu Core 并运行了“snap refresh”,此操作没有任何警告,但现在我无法运行任何 snap 命令。它们都给出了类似的错误:
$ snap refresh
error: cannot communicate with server: Post http://localhost/v2/snaps: EOF
Snapd 看起来很高兴:
$ sudo systemctl status snapd
● snapd.service - Snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-03-21 09:45:33 UTC; 3min 31s ago
Main PID: 26638 (snapd)
CGroup: /system.slice/snapd.service
└─26638 /usr/lib/snapd/snapd
Mar 21 09:45:33 mia systemd[1]: Started Snappy daemon.
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: snapmgr.go:373: DEBUG: snapmgr refresh randomness 1h30m57.242811579s
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: daemon.go:250: DEBUG: init done in 6.458098ms
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: daemon.go:251: started snapd/2.23.1 (series 16) ubuntu-core/16 (armhf) linux/4.4.0-1030-raspi2.
Mar 21 09:45:33 mia snapd[26638]: 2017/03/21 09:45:33.831485 daemon.go:251: started snapd/2.23.1 (series 16) ubuntu-core/16 (armhf) linux/4.4.0-1030-raspi2.
当我重新启动 snapd 时:
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit snapd.service has finished shutting down.
Mar 21 09:45:33 mia systemd[1]: Started Snappy daemon.
-- Subject: Unit snapd.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit snapd.service has finished starting up.
--
-- The start-up result is done.
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: snapmgr.go:373: DEBUG: snapmgr refresh randomness 1h30m57.242811579s
Mar 21 09:45:33 mia audit[26645]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=26645 comm="apparmor_parser"
Mar 21 09:45:33 mia kernel: audit: type=1400 audit(1490089533.812:1364): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=26645 co
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: daemon.go:250: DEBUG: init done in 6.458098ms
Mar 21 09:45:33 mia /usr/lib/snapd/snapd[26638]: daemon.go:251: started snapd/2.23.1 (series 16) ubuntu-core/16 (armhf) linux/4.4.0-1030-raspi2.
Mar 21 09:45:33 mia snapd[26638]: 2017/03/21 09:45:33.831485 daemon.go:251: started snapd/2.23.1 (series 16) ubuntu-core/16 (armhf) linux/4.4.0-1030-raspi2.
Mar 21 09:49:05 mia sudo[26652]: joeborg : TTY=pts/0 ; PWD=/home/joeborg ; USER=root ; COMMAND=/bin/systemctl status snapd
Mar 21 09:49:05 mia sudo[26652]: pam_unix(sudo:session): session opened for user root by joeborg(uid=0)
Mar 21 09:49:05 mia sudo[26652]: pam_unix(sudo:session): session closed for user root
Mar 21 09:50:18 mia sudo[26656]: joeborg : TTY=pts/0 ; PWD=/home/joeborg ; USER=root ; COMMAND=/bin/journalctl -xe snapd
Mar 21 09:50:18 mia sudo[26656]: pam_unix(sudo:session): session opened for user root by joeborg(uid=0)
Mar 21 09:50:18 mia sudo[26656]: pam_unix(sudo:session): session closed for user root
Mar 21 09:50:20 mia sudo[26658]: joeborg : TTY=pts/0 ; PWD=/home/joeborg ; USER=root ; COMMAND=/bin/journalctl -xe
Mar 21 09:50:20 mia sudo[26658]: pam_unix(sudo:session): session opened for user root by joeborg(uid=0)