【Ubuntu】解决 Could not get lock /var/lib/dpkg/lock-frontend
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1823 (unattended-upgr)N: Be aware that removing the lock file is not a solution and may break your system.E: Unable to acquire
·
写在前面的话:
- 版权声明:本文为博主原创文章,转载请注明出处!
- 博主是一个小菜鸟,并且非常玻璃心!如果文中有什么问题,请友好地指出来,博主查证后会进行更正,啾咪~~
- 每篇文章都是博主现阶段的理解,如果理解的更深入的话,博主会不定时更新文章。
- 本文初次更新时间:2020.10.28,最后更新时间:2020.10.28
正文开始
问题
在终端通过sudo apt-get install xxx
安装软件时报错:
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1823 (unattended-upgr)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
这表明当前有某个进程正在apt-get,导致资源被锁不可用。资源被锁的原因可能是上次运行安装或更新时没有正常完成。
解决
解决方法很简单:
sudo rm /var/lib/dpkg/lock-frontend
参考
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献3条内容
所有评论(0)