While running command you face error in terminal "Unable to lock the administration directory,is another process using it?"
Solution :-
- If this error message comes while running the command in the terminal, please follow the process as mentioned below:-
Some background update is going on, please wait for some time, and run the command again, and please do not restart the system, as restarting may cause Ubuntu to crash.
Another Solution :-
- Please follow the process as mentioned below:-
- Trying to install an application using the apt command on Ubuntu when encountered the following error:
(a) Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
(b) Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
(c) Could not get lock /var/lib/apt/lists/lock – open (11: Resource temporarily unavailable)
- Type the given command in the same terminal where you received the respective error
sudo lsof /var/lib/dpkg/lock
- After the command, you will see the of processes running in the background.
- Note down the PID number received and run the command by entering the PID number at the end of the below command.
sudo kill -9 <PID>