Broken apt upgrade (PEBKAC)
Ken D'Ambrosio
ken at jots.org
Wed Sep 2 12:51:11 UTC 2020
On 2020-09-01 16:56, jon danniken wrote:
> Thanks Paul, unfortunately that wasn't in my knowledge base at the time, and the terminal window (Konsole) has been closed. It was misbehaving after the CTRL-Z, and not allowing me to scroll the screen buffer (instead it scrolled the command line), and I closed it.
>
> That's two strikes against me. :(
>
> Jon
>
> On Tue, Sep 1, 2020 at 3:41 PM Paul Smith <paul at mad-scientist.net> wrote:
>
>> On Tue, 2020-09-01 at 15:11 -0500, jon danniken wrote:
>>> but instead of hitting "Q" I hit CTRL-Z.
>>
>> I think you should have included a little bit more of your "long story"
>> else we can't help as effectively.
>>
>> In particular if you haven't done anything like kill the terminal or
>> similar, you can just use "fg" at the shell prompt you got after you
>> used ^Z to bring the process you backgrounded into the foreground and
>> continue using it.
Easy answer: reboot. That *will* solve your file lock issue, though it
might introduce other issues if there are packages mid-install.
Less-easy answer:
sudo fuser /var/lib/dpkg/lock-frontend
That will return something like:
/var/lib/dpkg/lock-frontend: 123
(there might be additional numbers, too)
Those are the process IDs -- PIDs -- of the processes that have that
file open. Kill 'em:
kill 123; kill -9 123 # The "-9" is the "kill it with fire" option, in
case the first one didn't succeed
Then, probably an "apt-get -f install" to fix up anything left dangling
from the interrupted apt-get, and then you should be good to go on with
whatever you were trying to do in the first place.
-Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20200902/801469b5/attachment.html>
More information about the ubuntu-users
mailing list