Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum Linuxiarze.pl

Author Topic: [SOLVED] Error: E: Could not get lock /var/lib/dpkg/lock-frontend  (Read 201 times)

Offline 7ua

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
When trying to install any package, I get the following error   :-\ :
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
Please help!  :(
« Last Edit: December 28, 2021, 04:27:21 pm by 7ua »
Always wanting to help. +100%

Offline pewex

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #1 on: December 27, 2021, 06:34:04 pm »
It seems that another process is using /var/lib/dpkg/lock.
Google shows a few ways to fix it.



« Last Edit: December 27, 2021, 06:40:08 pm by pewex »

Offline 7ua

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #2 on: December 27, 2021, 10:54:28 pm »
It seems that another process is using /var/lib/dpkg/lock.
Google shows a few ways to fix it.
So, what should I do?
Always wanting to help. +100%

Offline pewex

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #3 on: December 28, 2021, 01:14:40 pm »
I'm newbie too, so I'm not sure if I'm right.
Maybe, first read this:
https://www.maketecheasier.com/unable-to-lock-error-ubuntu/
 
« Last Edit: December 28, 2021, 02:03:48 pm by pewex »

Offline 7ua

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #4 on: December 28, 2021, 04:24:22 pm »
 :) Found a working solution. Source: https://askubuntu.com/questions/1109982/e-could-not-get-lock-var-lib-dpkg-lock-frontend-open-11-resource-temporari
This error may mean the system is updating or some other package manager is being used.
1. Firstly Try running
Code: [Select]
sudo killall apt apt-get
2.If it still dose not work remove the lock files. like this:
Code: [Select]
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
then reconfigure
Code: [Select]
sudo dpkg --configure -aLastly
Code: [Select]
sudo apt updateThe no. 2 solution worked for me.
« Last Edit: December 28, 2021, 05:59:04 pm by 7ua »
Always wanting to help. +100%

Offline pewex

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #5 on: December 28, 2021, 05:08:13 pm »
Great! that You have found right resolve.
The no. 2 solution worked for me.

Maybe the solution no.1 ('sudo killall apt apt-get') did not work because another program
(for example: Synaptic) or process was locking (one of) these files which You removed by 'rm' command.
It seems that apt or apt-get program wasn't the reason of the problem.

« Last Edit: December 29, 2021, 07:20:07 am by pewex »

Offline 7ua

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #6 on: December 28, 2021, 06:02:17 pm »
Great! that You have found right resolve.
The no. 2 solution worked for me.

Maybe the solution no.1 ('sudo killall apt apt-get') did not work because another program
(for example: Synaptic) or process was locking (one of) these files which You removed by 'rm' command.
It seems that apt or apt-get program wasn't the reason of the problem.

The purpose of sudo killall apt apt-get was that if any other package manager was being used it would be closed, and i could install my package, although i do think you are right that it wasnt apt or apt-get that was causing the error, i think it might have been an auto update.
Always wanting to help. +100%

Offline pewex

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
Re: [SOLVED] Error: E: Could not get lock /var/lib/dpkg/lock-frontend
« Reply #7 on: December 29, 2021, 07:24:32 am »
Try this command:
ps aux | grep -i apt
It should show You a list of other "apt" running programs or processes.
(-i ignores letter/word case).
« Last Edit: December 29, 2021, 11:43:42 am by pewex »