LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Could not get lock ? (https://www.linuxquestions.org/questions/linux-newbie-8/could-not-get-lock-4175686844/)

jan128 12-14-2020 04:58 PM

Could not get lock ?
 
What to do ?
Wait - for what ?

" is another process using it? "

I do not know , if it is what can it be done to stop it ?





Code:

a@a-desktop:~$ sudo apt upgrade
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?
a@a-desktop:~$


dugan 12-14-2020 05:03 PM

Personally, I'd just reboot.

The correct answer is to use tools like fuser and lsof to determine which process is using /var/lib/dpkg/lock-frontend.

michaelk 12-14-2020 05:08 PM

Your system is probably doing an automatic search for new updates or possibly doing an automatic update if so configured. Just wait for it to finish.

frankbell 12-14-2020 07:26 PM

I second what michaelk said. I have witnessed that a lot of DEs do a check for updates immediately upon login and periodically thereafter.

jan128 12-14-2020 09:53 PM

c@c-SATA:~$ reboot
Operation inhibited by "APT" (PID 29616 "unattended-upgr", user root), reason is "APT is installing or removing packages".
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.
c@c-SATA:~$ uname -a
Linux c-SATA 4.15.0-122-generic #124~16.04.1-Ubuntu SMP Thu Oct 15 16:08:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
c@c-SATA:~$

ondoho 12-15-2020 12:33 AM

^ There you are, you don't even need to do it manually, it is automated.
But if you do it manually you must run 'apt update' before 'apt upgrade'.


All times are GMT -5. The time now is 03:01 PM.