才子佳人博客

我的故事我讲述

[Ubuntu]解决 Could not get lock /var/lib/dpkg/lock-f
###SmallArticleTitle###
来源:blog.csdn.net;  编辑:xjh;  2021-04-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

you can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

来源参考:
https://blog.csdn.net/newcong0123/article/details/109331845
https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process

分类:网络日志 | 评论数:0 | 浏览数:32
相关文章
文章点击排行
本年度文章点击排行
发表评论:
  • 昵称: *
  • 邮箱: *
  • 网址:
  • 评论:(最多100字)
  • 验证码: