当前位置: 首页>>技术教程>>正文


无法获得锁/var/cache/apt/archives/lock – 打开

问题描述

我现在在终端中遇到这个问题已经一天了。我试过修复,阅读了许多指南,但一无所获。我是 ubuntu 的新手,我们将不胜感激。 “14.04 升”

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

也有这个数据。

/var/lock
/var/cache/apt-xapian-index/index.1/flintlock
/var/cache/software-center/xapian/flintlock
/var/lib/alsa/asound.state.lock
/var/lib/apt-xapian-index/update-lock
/var/lib/dpkg/lock
/var/lib/dpkg/info/libfile-fcntllock-perl.list
/var/lib/dpkg/info/libfile-fcntllock-perl.md5sums
/var/lib/dpkg/info/liblockfile-bin.list
/var/lib/dpkg/info/liblockfile-bin.md5sums
/var/lib/dpkg/info/liblockfile1:i386.list
/var/lib/dpkg/info/liblockfile1:i386.md5sums
/var/lib/dpkg/info/liblockfile1:i386.postinst
/var/lib/dpkg/info/liblockfile1:i386.postrm
/var/lib/dpkg/info/liblockfile1:i386.shlibs
/var/lib/dpkg/info/lockfile-progs.list
/var/lib/dpkg/info/lockfile-progs.md5sums
/var/lib/dpkg/info/python-lockfile.list
/var/lib/dpkg/info/python-lockfile.md5sums
/var/lib/dpkg/info/python-lockfile.postinst
/var/lib/dpkg/info/python-lockfile.prerm

最佳方案

如果只有一个终端运行 apt-get ,或者没有 Synaptic 和 Ubuntu 软件中心;您可以使用以下方法删除或移动锁定文件:

sudo mv /var/cache/apt/archives/lock /var/cache/apt/archives/lock_bak

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/13291.html,未经允许,请勿转载。