0
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not open lock file /var/lib/dpkg/lock - open (21: Is a directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

-1

Your error says that /var/lib/dpkg/lock is a directory. It's supposed to either be a regular file or not exist at all. See if sudo rmdir /var/lib/dpkg/lock works. (If it fails because there's stuff in it, move the stuff somewhere else then delete the directory.)