Skip to main content

Ubuntu dpkg lock error

Error on ubuntu:
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?

Solution:
You have two errors here. 

1. You are missing a GPG key
2. The dpkg lock file is locked.

You should fix (2) before you fix (1).

2. Open a terminal and type

lsof – List Of Open Files


Code:
sudo lsof /var/lib/dpkg/lock

You can then either close that program, restart your PC or send a -TERM to the program with the lock by using kill and the pid.


Code:
sudo kill <pid>

After killing the process the dpkg needs to be configured else it will throw this error:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

Code:
sudo dpkg --configure -a


1. Only if required:
After that you need to import the key.

EDIT: Added command.

Code:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2EBC26B60C5A2783
then type

Code:
sudo apt-get update

Source:
https://ubuntuforums.org/showthread.php?t=1858466

Comments

Popular posts from this blog

AC mains current and transformer current

These are two separate issues: 1) How much current the transformer can supply? 2) How much current can your mains AC supply deliver? The answer to (2) is easy. Go to your fuse box and look at the rating on the fuse or circuit breaker. If the rating is 40A, then the maximum power delivered before blowing the fuse is 220V x 40A = 8800W. Generally it is between (20A-50A) and the answer to (1) is, The maximum current delivered by the transformer will depend on the size and construction of the transformer: 1. As an example, let us say the transformer steps down from 220VAC to 20VAC.     This is approximately 10:1 reduction. 2. Then if the transformer is rated at 1A on...

How to calculate the battery standby time according to the load?

Things we should know:   P = V . I                     (ie. power in watts = volts x amps) Every battery has a amps/hr (Ah) rating which signifies for how many hours it can deliver that much amount of current? for eg. 2000mAh battery can deliver 2000mili Amps per hour  Eg.1 Inverter battery standby calculation 1.Calculating the total battery capacity in Watts/hr:  if our inverter battery has a rating of 150Ah and voltage 12V thus it can deliver 150Amps per hour. thus power delivered per hour will be 1800Watts/hr  (1800 = 12 x 150) .............................(  P = V . I  ) 2.battery threshold level : (actual battery capacity) now before proceeding take into consideration that the battery wont be fully discharged due to the internal protection circuit in the inverter so we have to first take 85% of our total battery ca...

Basics of MS-DOS commands (PDF downloadable)

MS-DOS basic concepts and commands with examples: https://drive.google.com/file/d/0B3e9v7xyGe0ubVBHWnpwUW1ZYnc/edit?usp=sharing MS-DOS simple commands with exmaples: https://drive.google.com/file/d/0B3e9v7xyGe0uVXhlbm9nb01EWWs/edit?usp=sharing