使用请求的插头安装卡扣后卡死了

时间:2017-04-11 19:15:11

标签: snapcraft

我创建了一个快照,通过运行

在本地安装
$ snap install <filename> --dangerous   

这一直有效,直到我开始添加插头 现在运行&#34;快照列表&#34;导致此错误:

error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: connection refused    

由于snapd没有运行,我无法解决问题或执行任何操作。这是在16.04 Ubuntu,我已经安装了构建工具等。

运行命令&#34; journalctl -u snapd.service&#34;给出了这个输出:

Apr 10 23:28:19 ubuntu16 snapd[1024]: 2017/04/10 23:28:19.055104 helpers.go:173: cannot connect plug "home" from snap "rev2agent", no such plug
Apr 10 23:28:19 ubuntu16 /usr/lib/snapd/snapd[1024]: helpers.go:173: cannot connect plug "network-bind" from snap "rev2agent", no such plug
Apr 10 23:28:19 ubuntu16 snapd[1024]: 2017/04/10 23:28:19.055437 helpers.go:173: cannot connect plug "network-bind" from snap "rev2agent", no such plug
Apr 10 23:28:19 ubuntu16 /usr/lib/snapd/snapd[1024]: daemon.go:250: DEBUG: init done in 7.822584ms
Apr 10 23:28:19 ubuntu16 /usr/lib/snapd/snapd[1024]: daemon.go:251: started snapd/2.23.6 (series 16; classic) ubuntu/16.04 (amd64) linux/4.8.0-46-generic.
Apr 10 23:28:19 ubuntu16 snapd[1024]: 2017/04/10 23:28:19.108729 daemon.go:251: started snapd/2.23.6 (series 16; classic) ubuntu/16.04 (amd64) linux/4.8.0-
Apr 10 23:28:19 ubuntu16 /usr/lib/snapd/snapd[1024]: taskrunner.go:353: DEBUG: Running task 76 on Doing: Setup snap "rev2agent" (unset) security profiles
Apr 10 23:28:19 ubuntu16 snapd[1024]: panic: assignment to entry in nil map
Apr 10 23:28:19 ubuntu16 snapd[1024]: goroutine 7 [running]:
Apr 10 23:28:19 ubuntu16 snapd[1024]: panic(0x556dd7d9c320, 0xc8202aba20)
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3ea
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/interfaces/builtin.(*ContentInterface).SanitizePlug(0x556dd8364380, 0xc820316c60, 0x0, 0x0)
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/interfaces/builtin/content.go:80 +0x4cb
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/interfaces.(*Repository).AddSnap(0xc8201ff8c0, 0xc820296900, 0x0, 0x0)
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/interfaces/repo.go:837 +0x960
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/overlord/ifacestate.(*InterfaceManager).setupProfilesForSnap(0xc820208a60, 0xc820202120, 0x
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/ifacestate/handlers.go:150 +0x
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/overlord/ifacestate.(*InterfaceManager).doSetupProfiles(0xc820208a60, 0xc820202120, 0xc8202
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/ifacestate/handlers.go:124 +0x
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/overlord/ifacestate.(*InterfaceManager).(github.com/snapcore/snapd/overlord/ifacestate.doSe
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/ifacestate/ifacemgr.go:70 +0x4
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/overlord/state.(*TaskRunner).run.func1(0x0, 0x0)
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/overlord/state/taskrunner.go:146 +0x71
Apr 10 23:28:19 ubuntu16 snapd[1024]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0xc820221950, 0xc820215770)
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x
Apr 10 23:28:19 ubuntu16 snapd[1024]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Apr 10 23:28:19 ubuntu16 snapd[1024]:         /build/snapd-ds9lFD/snapd-2.23.6/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x
Apr 10 23:28:19 ubuntu16 systemd[1]: snapd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 10 23:28:19 ubuntu16 systemd[1]: snapd.service: Unit entered failed state.
Apr 10 23:28:19 ubuntu16 systemd[1]: snapd.service: Failed with result 'exit-code'.
Apr 10 23:28:19 ubuntu16 systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Apr 10 23:28:19 ubuntu16 systemd[1]: Stopped Snappy daemon.

我想回到工作的snap / snapd系统。它似乎因为一个插头“家”而崩溃了。或者&#39; network-bind&#39;在我的快照。重新启动只是再次这样做。如何删除此已安装的快照?还是重新开始?

4 个答案:

答案 0 :(得分:0)

嗯,这看起来像一个坏的snapd bug;你是否介意提交一份有关详细信息的bug来重新编写snapd(https://bugs.launchpad.net/snapd)?

作为一种解决方法,请尝试将快照移开/ var / lib / snapd / snaps,这可能足以避免触发此崩溃。

答案 1 :(得分:0)

打开ubuntu恢复模式并在框中选择启动选项,然后在终端上键入以下行

 sudo dpkg --configure -a

答案 2 :(得分:0)

尝试

sudo apt autoremove --purge snapd 

然后

sudo apt-get install snapd
  

注意:它将使用快照删除以前安装的应用程序。您将需要重新安装它们。

答案 3 :(得分:0)

尝试sudo systemctl restart snapd.service

你应该没事