31

I been getting this problem in terminal now for a day. I have tried fixing read many guides and nothing. I am new to ubuntu any help will be appreciated. "14.04 lts"

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

also have this data.

/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
0

1 Answer 1

70

If there is only one terminal running apt-get, or no Synaptic and Ubuntu Software Center; You can remove or move the lock file using:

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

1
  • 1
    I used rm instead of mv to delete the lock, rather than rename it, and it worked just as well. Oct 28, 2019 at 11:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .