0

I am unable to install and update many things on Ubuntu 18.04 because the terminal always shows:

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
karel
  • 114,770

1 Answers1

0

You need to run update commands apt-get update or apt-get upgrade with superuser a.k.a. root privileges, i.e.

sudo apt-get update
sudo apt-get upgrade
Kulfy
  • 17,696
  • thanks so much ... but the command of denial just changed a little from "cant open/lock file or directory (/var/lib/LIST....), to.......E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? – Lord Luke Oct 18 '18 at 11:27
  • Actually what happened some other software like software updater might be using apt or dpkg right now. You can remove explicitly lock using rm -r /var/lib/dpkg/lock* or wait for the process which is using that to exit. – Kulfy Oct 18 '18 at 11:33
  • now the other issue am having is how to install ubuntu mate because my software center refused to install it? – Lord Luke Oct 19 '18 at 08:25
  • @LordLulent If you found the answer helpful, mark it as accepted by clicking on ✓. Also, it is highly recommended to have a question focused on a single issue. Please ask a new question for the same with more details. Thanks :-) – Kulfy Oct 19 '18 at 08:27