Ubuntu 16.04:“正在设置快照...”,dpkg冻结


12

我只是定期进行更新:

~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up snapd (2.14.2~16.04) ...

我不得不杀死dpkg进程。然后在apt-get update之后dpkg显示消息:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
gondy@***:~$ sudo dpkg --configure -a
Setting up snapd (2.14.2~16.04) ...

并且它再次挂起。我该怎么办?我完全需要这个包裹吗?我正在运行从14.04 LTS Server版本升级的Ubuntu 16.04。


1
在Ubuntu 18.04中问题仍然存在。
AnthonyB

Answers:


6

这是一个已知的错误,已在-提案中修复。您可以等到修复程序稳定下来,启用测试或使用解决方法后,再进行以下操作

  1. 用以下命令启动rootshell sudo -i
  2. echo "bash -c 'service snapd.boot-ok start'" | at now + 4 min
  3. 运行apt install snapd(如果它认为已取消dpkg进程使用 dpkg --configure -a
  4. 等待至少4分钟

或者,在第一个控制台上sudo service snapd.boot-ok start看到之后,只需从其他控制台运行即可Setting up snapd...


1
感谢您的回答。但是,我已经解决了这一问题,只需删除快照包即可。我不需要它。
刚迪
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.