How do I clear a lock so as to allow an upgrade
Bret Busby
bret at busby.net
Sun Nov 13 00:15:26 UTC 2022
On 13/11/2022 07:59, Bret Busby wrote:
> On 13/11/2022 07:53, J. Paul Bissonnette wrote:
>> Is another program like synaptic running?
>>
>> On Sun, 13 Nov 2022 07:50:19 +0800
>> bret at busby.net wrote:
>>
>>> Hello.
>>>
>>> Having run
>>> sudo apt update
>>> when I try to run
>>> sudo apt full-upgrade -y
>>> I get the following error.
>>>
>>> "
>>> Sun Nov 13 07:33:46 bret at bret-OptiPlex-9030-AIO:~$sudo apt
>>> full-upgrade -y Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> Waiting for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)
>>> ^Citing for cache lock: Could not get lock
>>> /var/lib/dpkg/lock-frontend. It is held by process 48429 (apt)... 6s
>>> Sun Nov 13 07:34:28 bret at bret-OptiPlex-9030-AIO:~$^C
>>> "
>>>
>>> How do I clear the lock, so as to allow the upgrade to proceed?
>>>
>>> I have run
>>> sudo kill 48429
>>> and that did not fix the problem, and I have rebooted the system, and
>>> that did not clear the lock.
>>>
>>> Also,
>>>
>>> "
>>> Sun Nov 13 07:44:11 bret at bret-OptiPlex-9030-AIO:~$sudo kill -9 48429
>>> Sun Nov 13 07:44:23 bret at bret-OptiPlex-9030-AIO:~$ps -ax | grep 48429
>>> 48429 pts/1 Z 0:00 [apt] <defunct>
>>> 248169 pts/3 S+ 0:00 grep --color=auto 48429
>>> Sun Nov 13 07:44:28 bret at bret-OptiPlex-9030-AIO:~$
>>> "
>>>
>>> I assume that the 'Z' means zombie, as it is one of the undead, and
>>> cannot be killed (I understand that kill -9 is the penultimate kill
>>> command; the kill of last resort, like a nuke).
>>>
>>> So, apart from reinstalling the system, to get to do an upgrade, how
>>> do I clear the lock?
>>>
>>> Thank you in anticipation.
>>> ..
>>> Bret Busby
>>> Armadale
>>> Western Australia
>>> (UTC+0800)
>>> .................
>>>
>>>
>>
>>
>
> Not synaptic.
>
> The only other possible running program, is that the System Update
> applet shows that updates are available, but, the same pid applies after
> rebooting and not manually loading any program, other than the
> sudo update
> and then sudo full upgrade
> .
>
> So, the lock and the pid are both preserved, regardless of what happens,
> and, through a shutdown and reboot (shutdown -r)
>
I should maybe have explicitly clarified this; I reboot the system, and
then do not load any program, but run
sudo apt update
and then run (or, try to run)
sudo apt full upgrade -y
and the lock error occurs.
I assume that the only other possible application running, that involves
package management, is the Software Updater applet, which shows that
updates are available.
I have tried running the update and the upgrade commands on separate
lines, as above, as, as I usually run them in a combination command
(sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove
-y && sudo apt autoclean -y)
, I had initially assumed that the upgrade command was trying to be run,
before the update command had completed, thence, the lock problem. But,
that assumption is apparently proved wrong.
..
Bret Busby
Armadale
West Australia
(UTC+0800)
..............
More information about the ubuntu-users
mailing list