我无法在 Kubuntu 18.10 上更新。我有 20 个包,从 GUI 更新时我得到: PackageKit 守护进程已崩溃
从终端: sudo apt-get update && sudo apt-get upgrade -y 我得到:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
我试过这个没有运气:https ://itsfoss.com/could-not-get-lock-error/comment-page-5/
我得到后的第二天:
E: dpkg 被中断,您必须手动运行 'sudo dpkg --configure -a' 来纠正问题。
运行: sudo dpkg --configure -a
Setting up snapd (2.37.1+18.10) ...
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.
systemctl 状态 snapd.service
● snapd.service - Snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; v
Active: deactivating (stop-sigterm) (Result: timeout)
Main PID: 22246 (snapd)
Tasks: 12 (limit: 4915)
Memory: 268.4M
CGroup: /system.slice/snapd.service
├─22246 /usr/lib/snapd/snapd
├─22319 apparmor_parser --replace --write-cache -O no
└─22320 apparmor_parser --replace --write-cache -O no
Feb 13 11:46:58 xxxx systemd[1]: Starting Snappy daemon...
Feb 13 11:46:58 xxxx snapd[22246]: AppArmor status: apparmor is
Feb 13 11:46:59 xxxx snapd[22246]: helpers.go:145: error trying
Feb 13 11:46:59 xxxx systemd[1]: snapd.service: Start operation
journalctl -xe
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit snapd.service has finished shutting down.
Feb 13 11:47:47 xxxx systemd[1]: snapd.service: Found left-over
Feb 13 11:47:47 xxxx systemd[1]: This usually indicates unclean
Feb 13 11:47:47 xxxx systemd[1]: snapd.service: Found left-over
Feb 13 11:47:47 xxxx systemd[1]: This usually indicates unclean
Feb 13 11:47:47 xxxx systemd[1]: Starting Snappy daemon...
我不能跑:sudo dpkg --configure -a
我得到:dpkg: error: dpkg frontend is locked by another process
lsof /var/lib/dpkg/lock
一切都死了。
我相信我必须重新安装新锁,我不知道该怎么做?
sudo touch /var/lib/dpkg/lock
不工作。
通过在启动和重新启动下按住 shift 键,我通过恢复模式以 root 身份进入终端。
sudo dpkg --configure -a
从终端后记开始工作。