0

I'm a new user of ubuntu and I tried to install emacs and ruby but there is an error and I don't know how to resolve. The emacs error is this:

  E: Could not open lock file /var/lib/dokg/lock - open (13: Permission denied)
  E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

The ruby error is enter image description here

Thaks for your help

Nayeli

Arronical
  • 19,893
Nayeli
  • 1
  • please separate your totally different problem for Ruby into a different question, and don't post images of text from your terminal - instead copy and paste the text into the question and format as code – Zanna Mar 27 '18 at 19:45

1 Answers1

2

Since you don't provide exact command that lead to this state, I can only think of a few possibilities:

  1. You did not run this with root privileges (you need special privileges to access mentioned path /var/lib/dpkg and /var/lib/dokg/lock) - you can fix this by adding sudo before your command (like sudo any commands you wish and entering your accounts password when prompted.

  2. Another program is currently accessing aforementioned directory (like opened package manager). You can just close it and thus unlock it.

Next time, please provide command that led to your behavior and Ubuntu version for good measure.